forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommandLine.ts
More file actions
53 lines (47 loc) · 1.84 KB
/
Copy pathcommandLine.ts
File metadata and controls
53 lines (47 loc) · 1.84 KB
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
51
52
53
import { emptyArray } from "../../_namespaces/ts.js";
import { verifyTsc } from "../helpers/tsc.js";
import { TestServerHost } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc:: commandLine::", () => {
verifyTsc({
scenario: "commandLine",
subScenario: "show help with ExitStatus.DiagnosticsPresent_OutputsSkipped",
sys: () =>
TestServerHost.createWatchedSystem(emptyArray, {
environmentVariables: new Map([["TS_TEST_TERMINAL_WIDTH", "120"]]),
}),
commandLineArgs: emptyArray,
});
verifyTsc({
scenario: "commandLine",
subScenario: "show help with ExitStatus.DiagnosticsPresent_OutputsSkipped when host can't provide terminal width",
sys: () => TestServerHost.createWatchedSystem(emptyArray),
commandLineArgs: emptyArray,
});
verifyTsc({
scenario: "commandLine",
subScenario: "does not add color when NO_COLOR is set",
sys: () =>
TestServerHost.createWatchedSystem(emptyArray, {
environmentVariables: new Map([["NO_COLOR", "true"]]),
}),
commandLineArgs: emptyArray,
});
verifyTsc({
scenario: "commandLine",
subScenario: "when build not first argument",
sys: () => TestServerHost.createWatchedSystem(emptyArray),
commandLineArgs: ["--verbose", "--build"],
});
verifyTsc({
scenario: "commandLine",
subScenario: "help",
sys: () => TestServerHost.createWatchedSystem(emptyArray),
commandLineArgs: ["--help"],
});
verifyTsc({
scenario: "commandLine",
subScenario: "help all",
sys: () => TestServerHost.createWatchedSystem(emptyArray),
commandLineArgs: ["--help", "--all"],
});
});