Skip to content

Commit 279b348

Browse files
committed
Accept baselines
1 parent 7944f50 commit 279b348

646 files changed

Lines changed: 721 additions & 744 deletions

File tree

Some content is hidden

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

Gulpfile.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -779,10 +779,6 @@ gulp.task("runtests",
779779
runConsoleTests("mocha-fivemat-progress-reporter", /*runInParallel*/ false, done);
780780
});
781781

782-
gulp.task("runtests-in-watch", ["build-rules", "tests"], done => {
783-
runConsoleTests("min", /*runInParallel*/ false, done, /*noExit*/ true);
784-
});
785-
786782
const nodeServerOutFile = "tests/webTestServer.js";
787783
const nodeServerInFile = "tests/webTestServer.ts";
788784
gulp.task(nodeServerOutFile, /*help*/ false, [servicesFile], () => {
@@ -1129,9 +1125,5 @@ gulp.task("lint", "Runs tslint on the compiler sources. Optional arguments are:
11291125
gulp.task("default", "Runs 'local'", ["local"]);
11301126

11311127
gulp.task("watch", "Watches the src/ directory for changes and executes runtests-parallel.", [], () => {
1132-
gulp.watch("src/**/*.*", ["runtests-parallel"]);
1133-
});
1134-
1135-
gulp.task("watch-no-parallel", "Watches the src/ directory for changes and executes runtests.", [], () => {
1136-
gulp.watch(["src/**/*.*", "scripts/typemock/src/**/*.*"], ["runtests-in-watch"]);
1128+
gulp.watch(["src/**/*.*", "scripts/typemock/src/**/*.*"], ["runtests-parallel"]);
11371129
});

src/harness/projectsRunner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,12 +380,12 @@ namespace project {
380380
}
381381
});
382382

383-
const vfs_ = vfs.VirtualFileSystem.createFromDocuments(/*useCaseSensitiveFileNames*/ true, allInputFiles, {
383+
const _vfs = vfs.VirtualFileSystem.createFromDocuments(/*useCaseSensitiveFileNames*/ true, allInputFiles, {
384384
currentDirectory: vpath.combine("/.src", this.testCase.projectRoot)
385385
});
386386

387387
// Dont allow config files since we are compiling existing source options
388-
const compilerHost = new ProjectCompilerHost(vfs_, compilerResult.compilerOptions, this.testCaseJustName, this.testCase, compilerResult.moduleKind);
388+
const compilerHost = new ProjectCompilerHost(_vfs, compilerResult.compilerOptions, this.testCaseJustName, this.testCase, compilerResult.moduleKind);
389389
return this.compileProjectFiles(compilerResult.moduleKind, compilerResult.configFileSourceFiles, () => rootFiles, compilerHost, compilerResult.compilerOptions);
390390

391391
function findOutputDtsFile(fileName: string) {

src/harness/unittests/tscWatchMode.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -707,15 +707,15 @@ namespace ts.tscWatch {
707707
createExclusiveCompilerOptionDiagnostic(watch(), configFileContentWithComment, "allowJs", "declaration", /*checkFirst*/ true),
708708
createExclusiveCompilerOptionDiagnostic(watch(), configFileContentWithComment, "allowJs", "declaration", /*checkFirst*/ false)
709709
];
710-
checkOutputErrors(host, initialErrors, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
710+
checkOutputErrors(host, initialErrors, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
711711

712712
host.vfs.writeFile("/a/b/tsconfig.json", configFileContentWithoutComment);
713713
host.runQueuedTimeoutCallbacks();
714714
const nowErrors = [
715715
createExclusiveCompilerOptionDiagnostic(watch(), configFileContentWithoutComment, "allowJs", "declaration", /*checkFirst*/ true),
716716
createExclusiveCompilerOptionDiagnostic(watch(), configFileContentWithoutComment, "allowJs", "declaration", /*checkFirst*/ false)
717717
];
718-
checkOutputErrors(host, nowErrors, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
718+
checkOutputErrors(host, nowErrors, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
719719

720720
assert.equal(nowErrors[0].start, initialErrors[0].start - configFileContentComment.length);
721721
assert.equal(nowErrors[1].start, initialErrors[1].start - configFileContentComment.length);
@@ -1264,7 +1264,7 @@ namespace ts.tscWatch {
12641264

12651265
checkOutputErrors(host, [
12661266
createCannotFindModuleDiagnostic(watch(), "/a/foo.ts", rootContent1, "bar")
1267-
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
1267+
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
12681268

12691269
// spy on calls to fileExists after synchronization is triggered
12701270
const fileExistsSpy2 = spy(host, "fileExists");
@@ -1299,7 +1299,7 @@ namespace ts.tscWatch {
12991299
.verify(_ => _(Arg.includes("/bar.")), Times.atLeastOnce())
13001300
.revoke();
13011301

1302-
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
1302+
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
13031303

13041304
// spy on fileExists when triggering synchronization
13051305
const fileExistsSpy2 = spy(host, "fileExists");
@@ -1314,7 +1314,7 @@ namespace ts.tscWatch {
13141314

13151315
checkOutputErrors(host, [
13161316
createCannotFindModuleDiagnostic(watch(), "/a/foo.ts", rootContent, "bar")
1317-
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
1317+
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
13181318

13191319
// spy on fileExists when triggering synchronization
13201320
const fileExistsSpy3 = spy(host, "fileExists");
@@ -1359,12 +1359,12 @@ namespace ts.tscWatch {
13591359

13601360
checkOutputErrors(host, [
13611361
createCannotFindModuleDiagnostic(watch(), "/a/b/foo.ts", rootContent, "fs")
1362-
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
1362+
], /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
13631363

13641364
const fileContent2 = fileContent1 + `declare module "fs" {\n export interface Stats {\n isFile(): boolean;\n }\n}`;
13651365
host.vfs.writeFile("/a/b/bar.d.ts", fileContent2);
13661366
host.runQueuedTimeoutCallbacks();
1367-
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
1367+
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
13681368
});
13691369

13701370
it("works when reusing program with files from external library", () => {
@@ -1397,7 +1397,7 @@ namespace ts.tscWatch {
13971397
"/a/b/projects/myProject/node_modules/module1/index.js",
13981398
fakes.FakeServerHost.libPath
13991399
]);
1400-
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
1400+
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterCompilationStarting);
14011401

14021402
// verify writeFile was called correctly.
14031403
writeFileSpy1
@@ -1417,7 +1417,7 @@ namespace ts.tscWatch {
14171417
"/a/b/projects/myProject/node_modules/module1/index.js",
14181418
fakes.FakeServerHost.libPath
14191419
]);
1420-
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
1420+
checkOutputErrors(host, emptyArray, /*errorsPosition*/ ExpectedOutputErrorsPosition.AfterFileChangeDetected);
14211421

14221422
// verify writeFile was called correctly
14231423
writeFileSpy2

src/harness/unittests/typingsInstaller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ namespace ts.projectSystem {
303303
.setup(_ => _(Arg.any(), Arg.any(), Arg.any(), Arg.any()), {
304304
callback: (_requestId: number, _args: string[], _cwd: string, cb: TI.RequestCompletedAction) => {
305305
const installedTypings = ["@types/lodash", "@types/react"];
306-
const typingFiles = [lodashDts, reactDts];
306+
const typingFiles = [lodashDts, reactDts];
307307
executeCommand(installer, host, installedTypings, typingFiles, cb);
308308
}
309309
});

tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(40,41): error TS
2121
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(40,45): error TS1002: Unterminated string literal.
2222
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(41,21): error TS2304: Cannot find name 'retValue'.
2323
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(46,13): error TS1005: 'try' expected.
24-
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(47,17): error TS2304: Cannot find name 'console'.
25-
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(53,13): error TS2304: Cannot find name 'console'.
2624
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(58,5): error TS1128: Declaration or statement expected.
2725
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(69,13): error TS1109: Expression expected.
2826
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(72,37): error TS1127: Invalid character.
@@ -89,7 +87,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,55): error T
8987
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or statement expected.
9088

9189

92-
==== tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts (89 errors) ====
90+
==== tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts (87 errors) ====
9391
declare module "fs" {
9492
export class File {
9593
constructor(filename: string);
@@ -186,16 +184,12 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
186184
~~~~~
187185
!!! error TS1005: 'try' expected.
188186
console.log(e);
189-
~~~~~~~
190-
!!! error TS2304: Cannot find name 'console'.
191187
}
192188
finally {
193189

194190
}
195191

196192
console.log('Done');
197-
~~~~~~~
198-
!!! error TS2304: Cannot find name 'console'.
199193

200194
return 0;
201195

tests/baselines/reference/customEventDetail.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
=== tests/cases/compiler/customEventDetail.ts ===
22
var x: CustomEvent;
3-
>x : CustomEvent
4-
>CustomEvent : CustomEvent
3+
>x : CustomEvent<any>
4+
>CustomEvent : CustomEvent<T>
55

66
// valid since detail is any
77
x.initCustomEvent('hello', true, true, { id: 12, name: 'hello' });
88
>x.initCustomEvent('hello', true, true, { id: 12, name: 'hello' }) : void
99
>x.initCustomEvent : (typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any) => void
10-
>x : CustomEvent
10+
>x : CustomEvent<any>
1111
>initCustomEvent : (typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any) => void
1212
>'hello' : "hello"
1313
>true : true
@@ -22,7 +22,7 @@ var y = x.detail.name;
2222
>y : any
2323
>x.detail.name : any
2424
>x.detail : any
25-
>x : CustomEvent
25+
>x : CustomEvent<any>
2626
>detail : any
2727
>name : any
2828

tests/baselines/reference/expressionTypeNodeShouldError.symbols

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ class C {
3131

3232
const nodes = document.getElementsByTagName("li");
3333
>nodes : Symbol(nodes, Decl(string.ts, 10, 5))
34-
>document.getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
34+
>document.getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
3535
>document : Symbol(document, Decl(lib.d.ts, --, --))
36-
>getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
36+
>getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
3737

3838
type ItemType = "".typeof(nodes.item(0));
3939
>ItemType : Symbol(ItemType, Decl(string.ts, 10, 50))
@@ -69,9 +69,9 @@ class C2 {
6969

7070
const nodes2 = document.getElementsByTagName("li");
7171
>nodes2 : Symbol(nodes2, Decl(number.ts, 10, 5))
72-
>document.getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
72+
>document.getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
7373
>document : Symbol(document, Decl(lib.d.ts, --, --))
74-
>getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
74+
>getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
7575

7676
type ItemType2 = 4..typeof(nodes.item(0));
7777
>ItemType2 : Symbol(ItemType2, Decl(number.ts, 10, 51))
@@ -107,9 +107,9 @@ class C3 {
107107

108108
const nodes3 = document.getElementsByTagName("li");
109109
>nodes3 : Symbol(nodes3, Decl(boolean.ts, 10, 5))
110-
>document.getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
110+
>document.getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
111111
>document : Symbol(document, Decl(lib.d.ts, --, --))
112-
>getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
112+
>getElementsByTagName : Symbol(Document.getElementsByTagName, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
113113

114114
type ItemType3 = true.typeof(nodes.item(0));
115115
>ItemType3 : Symbol(ItemType3, Decl(boolean.ts, 10, 51))

0 commit comments

Comments
 (0)