Skip to content

Commit 8927aaa

Browse files
committed
Rewrite tests
1 parent 9dd8391 commit 8927aaa

File tree

6 files changed

+53
-10
lines changed

6 files changed

+53
-10
lines changed

src/testRunner/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
"unittests/tsbuild/watchMode.ts",
117117
"unittests/tsc/declarationEmit.ts",
118118
"unittests/tsc/incremental.ts",
119+
"unittests/tsc/listFilesOnly.ts",
119120
"unittests/tscWatch/consoleClearing.ts",
120121
"unittests/tscWatch/emit.ts",
121122
"unittests/tscWatch/emitAndErrorUpdates.ts",
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
namespace ts {
2+
describe("unittests:: tsc:: listFilesOnly::", () => {
3+
verifyTsc({
4+
scenario: "listFilesOnly",
5+
subScenario: "before watch",
6+
fs: () => loadProjectFromFiles({
7+
"/src/test.ts": utils.dedent`
8+
export const x = 1;`,
9+
}),
10+
commandLineArgs: ["/src/test.ts", "--listFilesOnly", "--watch"]
11+
});
12+
13+
verifyTsc({
14+
scenario: "listFilesOnly",
15+
subScenario: "after watch",
16+
fs: () => loadProjectFromFiles({
17+
"/src/test.ts": utils.dedent`
18+
export const x = 1;`,
19+
}),
20+
commandLineArgs: ["/src/test.ts", "--watch", "--listFilesOnly"]
21+
});
22+
23+
verifyTsc({
24+
scenario: "listFilesOnly",
25+
subScenario: "loose file",
26+
fs: () => loadProjectFromFiles({
27+
"/src/test.ts": utils.dedent`
28+
export const x = 1;`,
29+
}),
30+
commandLineArgs: ["/src/test.ts", "--listFilesOnly"]
31+
});
32+
});
33+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//// [/lib/initial-buildOutput.txt]
2+
/lib/tsc /src/test.ts --watch --listFilesOnly
3+
error TS6370: Options 'watch' and 'listFilesOnly' cannot be combined.
4+
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
5+
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//// [/lib/initial-buildOutput.txt]
2+
/lib/tsc /src/test.ts --listFilesOnly --watch
3+
error TS6370: Options 'watch' and 'listFilesOnly' cannot be combined.
4+
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
5+
6+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [/lib/initial-buildOutput.txt]
2+
/lib/tsc /src/test.ts --listFilesOnly
3+
/lib/lib.d.ts
4+
/src/test.ts
5+
exitCode:: ExitStatus.Success
6+
7+

tests/cases/fourslash/listFilesOnly.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)