Skip to content

Commit c7df777

Browse files
author
Kanchalai Tanglertsampan
committed
Add unittest for parsing --lib in tsconfig
1 parent be0592d commit c7df777

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/cases/unittests/tsconfigParsing.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,25 @@ namespace ts {
8282
it("returns object with error when json is invalid", () => {
8383
assertParseError("invalid");
8484
});
85+
86+
it("returns object when users correctly specify library", () => {
87+
assertParseResult(
88+
`{
89+
"compilerOptions": {
90+
"library": "es5"
91+
}
92+
}`, {
93+
config: { compilerOptions: { library: "es5" } }
94+
});
95+
96+
assertParseResult(
97+
`{
98+
"compilerOptions": {
99+
"library": "es5,es6"
100+
}
101+
}`, {
102+
config: { compilerOptions: { library: "es5,es6" } }
103+
});
104+
});
85105
});
86106
}

0 commit comments

Comments
 (0)