Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/add-ns/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ describe('Add {N} schematic', () => {
expect(maps).toContain('src/*.ts');
});

it('should create the tsconfig.spec.json (web) with files', () => {
const specTsConfigPath = '/tsconfig.spec.json';
expect(appTree.files).toContain(specTsConfigPath);

const specTsConfig = JSON.parse(getFileContent(appTree, specTsConfigPath));
const files = specTsConfig.files;

expect(files).toBeDefined();
expect(files.includes('src/test.ts')).toBeTruthy();
expect(files.includes('src/polyfills.ts')).toBeTruthy();
});

it('should modify the base tsconfig.json to include path mappings', () => {
const baseTsConfigPath = '/tsconfig.json';
expect(appTree.files).toContain(baseTsConfigPath);
Expand Down
6 changes: 3 additions & 3 deletions src/ng-new/shared/_files/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"module": "commonjs",
Expand All @@ -9,8 +9,8 @@
]
},
"files": [
"test.ts",
"polyfills.ts"
"<%= sourcedir %>/test.ts",
"<%= sourcedir %>/polyfills.ts"
],
"include": [
"**/*.spec.ts",
Expand Down
1 change: 1 addition & 0 deletions src/ng-new/shared/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('Shared Application Schematic', () => {
expect(files).toContain('/foo/.gitignore');
expect(files).toContain('/foo/package.json');
expect(files).toContain('/foo/tsconfig.tns.json');
expect(files).toContain('/foo/tsconfig.spec.json');

expect(files).toContain('/foo/src/package.json');
expect(files).toContain('/foo/src/main.tns.ts');
Expand Down