Skip to content

Commit 53e2507

Browse files
committed
More scenarios in their own test
1 parent 5c8ef39 commit 53e2507

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+3308
-3307
lines changed

src/testRunner/tsconfig.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"unittests/reuseProgramStructure.ts",
5959
"unittests/semver.ts",
6060
"unittests/transform.ts",
61-
"unittests/transpile.ts",
6261
"unittests/tsbuild.ts",
6362
"unittests/tsbuildWatchMode.ts",
6463
"unittests/tscWatchMode.ts",
@@ -89,25 +88,50 @@
8988
"unittests/services/patternMatcher.ts",
9089
"unittests/services/preProcessFile.ts",
9190
"unittests/services/textChanges.ts",
91+
"unittests/services/transpile.ts",
9292
"unittests/tscWatch/emit.ts",
9393
"unittests/tscWatch/resolutionCache.ts",
9494
"unittests/tscWatch/watchEnvironment.ts",
9595
"unittests/tscWatch/watchApi.ts",
9696
"unittests/tsserver/cachingFileSystemInformation.ts",
97+
"unittests/tsserver/cancellationToken.ts",
9798
"unittests/tsserver/compileOnSave.ts",
99+
"unittests/tsserver/completions.ts",
100+
"unittests/tsserver/configFileSearch.ts",
101+
"unittests/tsserver/declarationFileMaps.ts",
102+
"unittests/tsserver/documentRegistry.ts",
103+
"unittests/tsserver/duplicatePackages.ts",
98104
"unittests/tsserver/events/largeFileReferenced.ts",
99105
"unittests/tsserver/events/projectLoading.ts",
100106
"unittests/tsserver/events/projectUpdatedInBackground.ts",
101107
"unittests/tsserver/externalProjects.ts",
108+
"unittests/tsserver/forceConsistentCasingInFileNames.ts",
109+
"unittests/tsserver/formatSettings.ts",
110+
"unittests/tsserver/getEditsForFileRename.ts",
111+
"unittests/tsserver/importHelpers.ts",
112+
"unittests/tsserver/inferredProjects.ts",
113+
"unittests/tsserver/languageService.ts",
114+
"unittests/tsserver/maxNodeModuleJsDepth.ts",
115+
"unittests/tsserver/metadataInResponse.ts",
116+
"unittests/tsserver/navTo.ts",
117+
"unittests/tsserver/occurences.ts",
118+
"unittests/tsserver/openFile.ts",
102119
"unittests/tsserver/projectErrors.ts",
120+
"unittests/tsserver/projectReferences.ts",
121+
"unittests/tsserver/refactors.ts",
103122
"unittests/tsserver/reload.ts",
123+
"unittests/tsserver/rename.ts",
104124
"unittests/tsserver/resolutionCache.ts",
105125
"unittests/tsserver/session.ts",
106126
"unittests/tsserver/skipLibCheck.ts",
107127
"unittests/tsserver/symLinks.ts",
128+
"unittests/tsserver/syntaxOperations.ts",
108129
"unittests/tsserver/textStorage.ts",
109130
"unittests/tsserver/telemetry.ts",
131+
"unittests/tsserver/typeAquisition.ts",
132+
"unittests/tsserver/typeReferenceDirectives.ts",
110133
"unittests/tsserver/typingsInstaller.ts",
134+
"unittests/tsserver/untitledFiles.ts",
111135
"unittests/tsserver/versionCache.ts",
112136
"unittests/tsserver/watchEnvironment.ts"
113137
]

src/testRunner/unittests/config/commandLineParsing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
namespace ts {
2-
describe("commandLineParsing:: parseCommandLine", () => {
2+
describe("config:: commandLineParsing:: parseCommandLine", () => {
33

44
function assertParseResult(commandLine: string[], expectedParsedCommandLine: ParsedCommandLine) {
55
const parsed = parseCommandLine(commandLine);
@@ -367,7 +367,7 @@ namespace ts {
367367
});
368368
});
369369

370-
describe("commandLineParsing:: parseBuildOptions", () => {
370+
describe("config:: commandLineParsing:: parseBuildOptions", () => {
371371
function assertParseResult(commandLine: string[], expectedParsedBuildCommand: ParsedBuildCommand) {
372372
const parsed = parseBuildCommand(commandLine);
373373
const parsedBuildOptions = JSON.stringify(parsed.buildOptions);

src/testRunner/unittests/config/configurationExtension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ namespace ts {
208208
}
209209
}
210210

211-
describe("configurationExtension", () => {
211+
describe("config:: configurationExtension", () => {
212212
forEach<[string, string, fakes.ParseConfigHost], void>([
213213
["under a case insensitive host", caseInsensitiveBasePath, caseInsensitiveHost],
214214
["under a case sensitive host", caseSensitiveBasePath, caseSensitiveHost]

src/testRunner/unittests/config/convertCompilerOptionsFromJson.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
namespace ts {
2-
describe("convertCompilerOptionsFromJson", () => {
2+
describe("config:: convertCompilerOptionsFromJson", () => {
33
const formatDiagnosticHost: FormatDiagnosticsHost = {
44
getCurrentDirectory: () => "/apath/",
55
getCanonicalFileName: createGetCanonicalFileName(/*useCaseSensitiveFileNames*/ true),

src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace ts {
22
interface ExpectedResult { typeAcquisition: TypeAcquisition; errors: Diagnostic[]; }
3-
describe("convertTypeAcquisitionFromJson", () => {
3+
describe("config:: convertTypeAcquisitionFromJson", () => {
44
function assertTypeAcquisition(json: any, configFileName: string, expectedResult: ExpectedResult) {
55
assertTypeAcquisitionWithJson(json, configFileName, expectedResult);
66
assertTypeAcquisitionWithJsonNode(json, configFileName, expectedResult);

src/testRunner/unittests/config/initializeTSConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
namespace ts {
2-
describe("initTSConfig", () => {
2+
describe("config:: initTSConfig", () => {
33
function initTSConfigCorrectly(name: string, commandLinesArgs: string[]) {
44
describe(name, () => {
55
const commandLine = parseCommandLine(commandLinesArgs);
@@ -30,4 +30,4 @@ namespace ts {
3030

3131
initTSConfigCorrectly("Initialized TSConfig with advanced options", ["--init", "--declaration", "--declarationDir", "lib", "--skipLibCheck", "--noErrorTruncation"]);
3232
});
33-
}
33+
}

src/testRunner/unittests/config/matchFiles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ namespace ts {
143143
return createFileDiagnostic(file, start, length, diagnosticMessage, arg0);
144144
}
145145

146-
describe("matchFiles", () => {
146+
describe("config:: matchFiles", () => {
147147
it("with defaults", () => {
148148
const json = {};
149149
const expected: ParsedCommandLine = {

src/testRunner/unittests/config/projectReferences.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ namespace ts {
9696
checkResult(prog, host);
9797
}
9898

99-
describe("project-references meta check", () => {
99+
describe("config:: project-references meta check", () => {
100100
it("default setup was created correctly", () => {
101101
const spec: TestSpecification = {
102102
"/primary": {
@@ -118,7 +118,7 @@ namespace ts {
118118
/**
119119
* Validate that we enforce the basic settings constraints for referenced projects
120120
*/
121-
describe("project-references constraint checking for settings", () => {
121+
describe("config:: project-references constraint checking for settings", () => {
122122
it("errors when declaration = false", () => {
123123
const spec: TestSpecification = {
124124
"/primary": {
@@ -248,7 +248,7 @@ namespace ts {
248248
/**
249249
* Path mapping behavior
250250
*/
251-
describe("project-references path mapping", () => {
251+
describe("config:: project-references path mapping", () => {
252252
it("redirects to the output .d.ts file", () => {
253253
const spec: TestSpecification = {
254254
"/alpha": {
@@ -268,7 +268,7 @@ namespace ts {
268268
});
269269
});
270270

271-
describe("project-references nice-behavior", () => {
271+
describe("config:: project-references nice-behavior", () => {
272272
it("issues a nice error when the input file is missing", () => {
273273
const spec: TestSpecification = {
274274
"/alpha": {
@@ -289,7 +289,7 @@ namespace ts {
289289
/**
290290
* 'composite' behavior
291291
*/
292-
describe("project-references behavior changes under composite: true", () => {
292+
describe("config:: project-references behavior changes under composite: true", () => {
293293
it("doesn't infer the rootDir from source paths", () => {
294294
const spec: TestSpecification = {
295295
"/alpha": {
@@ -308,7 +308,7 @@ namespace ts {
308308
});
309309
});
310310

311-
describe("project-references errors when a file in a composite project occurs outside the root", () => {
311+
describe("config:: project-references errors when a file in a composite project occurs outside the root", () => {
312312
it("Errors when a file is outside the rootdir", () => {
313313
const spec: TestSpecification = {
314314
"/alpha": {

src/testRunner/unittests/config/showConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
namespace ts {
2-
describe("showConfig", () => {
2+
describe("config:: showConfig", () => {
33
function showTSConfigCorrectly(name: string, commandLinesArgs: string[], configJson?: object) {
44
describe(name, () => {
55
const outputFileName = `showConfig/${name.replace(/[^a-z0-9\-./ ]/ig, "")}/tsconfig.json`;

src/testRunner/unittests/config/tsconfigParsing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
namespace ts {
2-
describe("tsconfigParsing:: parseConfigFileTextToJson", () => {
2+
describe("config:: tsconfigParsing:: parseConfigFileTextToJson", () => {
33
function assertParseResult(jsonText: string, expectedConfigObject: { config?: any; error?: Diagnostic[] }) {
44
const parsed = parseConfigFileTextToJson("/apath/tsconfig.json", jsonText);
55
assert.equal(JSON.stringify(parsed), JSON.stringify(expectedConfigObject));

0 commit comments

Comments
 (0)