Skip to content

Commit

Permalink
additional validation for types and typeRoots
Browse files Browse the repository at this point in the history
  • Loading branch information
nycdotnet committed Jan 9, 2017
1 parent cd392c5 commit ba7ec72
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 5 additions & 1 deletion test/optionsResolverTests.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion test/optionsResolverTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ export var tests : nodeunit.ITestGroup = {
}).catch((err) => {test.ifError(err); test.done();});
},
"config entries come through appropriately": (test: nodeunit.Test) => {
test.expect(16);
test.expect(20);
const cfg = getConfig("minimalist");
cfg.tsconfig = './test/tsconfig/full_valid_tsconfig.json';

Expand All @@ -721,6 +721,10 @@ export var tests : nodeunit.ITestGroup = {
test.strictEqual(result.charset, 'utf8');
test.strictEqual(result.strictNullChecks, false);
test.strictEqual(result.listFiles, true);
test.strictEqual(result.types.length, 3);
test.ok(result.types.indexOf('issue') > -1);
test.strictEqual(result.typeRoots.length, 2);
test.ok(result.typeRoots.indexOf('./../node_modules/@types') > -1);
test.strictEqual(result.CompilationTasks[0].outDir, 'test/tsconfig/files');
test.strictEqual(result.CompilationTasks[0].out, undefined);
test.done();
Expand Down
4 changes: 3 additions & 1 deletion test/tsconfig_artifact/full_valid_tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"allowSyntheticDefaultImports": true,
"charset": "utf8",
"strictNullChecks": false,
"listFiles": true
"listFiles": true,
"typeRoots": ["./../node_modules/@types", "./../node_modules/types2_see_issue_391"],
"types": ["see","issue","391"]
},
"filesGlob": [
"./defs/**/*.ts",
Expand Down

0 comments on commit ba7ec72

Please sign in to comment.