hunk.code_window:     async readFile() {
         return inputData;
       },
       async writeFile(path: string, data: string) {
         try {
           const testCase = readFileSync(join(__dirname, 'test', 'cases', path) + '.json', 'utf8');
           expect(data).toEqual(testCase);
         } catch (e) {
           fail(`Unable to load test case '${path}': ${e.message || e}`);
         }
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep
hunk.after_edit:         const testCase = readFileSync(
             require.resolve(join(__dirname, 'test', 'cases', path) + '.json'), 'utf8');
  
hunk.file_path: packages/angular_devkit/core/src/workspace/json/writer_spec.ts
hunk.type: replace
file: import { ng } from '../../../utils/process';
  import { expectToFail } from '../../../utils/utils';
  
  export default function() {
    return Promise.resolve()
      .then(() => expectToFail(() => ng('config', 'schematics.@schematics/angular.component.prefix')))
      .then(() => ng('config', 'schematics.@schematics/angular.component.prefix' , 'new-prefix'))
      .then(() => ng('config', 'schematics.@schematics/angular.component.prefix'))
      .then(({ stdout }) => {
        if (!stdout.match(/new-prefix/)) {
          throw new Error(`Expected "new-prefix", received "${JSON.stringify(stdout)}".`);
        }
      });
  }
  