fix(schematics): set correct tsConfig for lint for cypress project

This commit is contained in:
--get 2018-11-09 18:37:38 -05:00 committed by Victor Savkin
parent ed938e4cda
commit e4f45afad9
2 changed files with 10 additions and 2 deletions

View File

@ -81,9 +81,13 @@ describe('schematic:cypres-project', () => {
appTree
);
const angularJson = readJsonInTree(tree, 'angular.json');
const project = angularJson.projects['my-app-e2e'];
expect(angularJson.projects['my-app-e2e'].root).toEqual(
'apps/my-app-e2e'
expect(project.root).toEqual('apps/my-app-e2e');
expect(project.architect.e2e.builder).toEqual('@nrwl/builders:cypress');
expect(project.architect.lint.options.tsConfig).toEqual(
'apps/my-app-e2e/tsconfig.e2e.json'
);
});

View File

@ -125,6 +125,10 @@ function updateAngularJson(options: CypressProjectSchema): Rule {
}
}
};
projectConfig.architect.lint.options.tsConfig = join(
normalize(options.e2eProjectRoot),
'tsconfig.e2e.json'
);
json.projects[options.e2eProjectName] = projectConfig;
return json;
});