Alex Eagle 4c26397937 chore(ngc): refactor out tsc-wrapped
This allows angular's build to depend on some extensions, but not on code generation, and breaks a cycle in the angular build
We now merge ts-metadata-collector into tsc-wrapped and stop publishing the former.
2016-05-25 09:45:55 -07:00

29 lines
679 B
TypeScript

import * as ts from 'typescript';
import {Tsc} from '../src/tsc';
describe('options parsing', () => {
const tsc = new Tsc(() => `
{
"angularCompilerOptions": {
"googleClosureOutput": true
},
"compilerOptions": {
"module": "commonjs",
"outDir": "built"
}
}`, () => ['tsconfig.json']);
it('should combine all options into ngOptions', () => {
const {parsed, ngOptions} = tsc.readConfiguration('projectDir', 'basePath');
expect(ngOptions).toEqual({
genDir:'basePath',
googleClosureOutput: true,
module: ts.ModuleKind.CommonJS,
outDir: 'basePath/built',
configFilePath: undefined
});
});
});