-
Notifications
You must be signed in to change notification settings - Fork 24.7k
/
perform_compile.spec.ts
50 lines (42 loc) 路 1.33 KB
/
perform_compile.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {readConfiguration} from '../src/perform_compile';
import {TestSupport, setup} from './test_support';
describe('perform_compile', () => {
let testSupport: TestSupport;
beforeEach(() => { testSupport = setup(); });
function writeSomeRoutes() {
testSupport.writeFiles({
'src/tsconfig-level-1.json': `
extends: "src/tsconfig-level-2.json",
angularCompilerOptions: {
"annotateForClosureCompiler": true
}
`,
'src/tsconfig-level-2.json': `
extends: "src/tsconfig-level-3.json",
angularCompilerOptions: {
"skipMetadataEmit": true
}
`,
'src/tsconfig-level-3.json': `
angularCompilerOptions: {
"annotateForClosureCompiler": false,
"annotationsAs": "decorators"
}
`,
});
}
it('should merge tsconfig "angularCompilerOptions"', () => {
writeSomeRoutes();
const {options} = readConfiguration('src/tsconfig-level-1.json');
expect(options.annotateForClosureCompiler).toBe(true);
expect(options.annotationsAs).toBe('decorators');
expect(options.skipMetadataEmit).toBe(false);
});
});