Skip to content

Commit ed224ca

Browse files
author
Yui T
committed
Update getEmitOutput test files to use new meta-data flag
1 parent 2a24ea5 commit ed224ca

8 files changed

+15
-15
lines changed

tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference path="fourslash.ts" />
22

3+
// @declaration: true
34
// @Filename: inputFile1.ts
45
//// var x: number = 5;
56
//// class Bar {
@@ -16,6 +17,5 @@
1617

1718
var inputFile1 = "tests/cases/fourslash/inputFile1";
1819
var inputFile2 = "tests/cases/fourslash/inputFile2";
19-
edit.enableDeclaration();
2020
var outputFilenames = inputFile1 + ".js" + " " + inputFile2 + ".js" + " " + inputFile1 + ".d.ts" + " " + inputFile2 + ".d.ts";
21-
verify.emitOutput(EmitOutputResult.Succeeded, outputFilenames);
21+
verify.emitOutput(EmitReturnStatus.Succeeded);

tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/// <reference path="fourslash.ts" />
22

3+
// @declaration: true
34
// @Filename: inputFile1.ts
5+
// @out: declSingleFile.js
46
//// var x: number = 5;
57
//// class Bar {
68
//// x : string;
@@ -14,10 +16,8 @@
1416
//// y : number;
1517
//// }
1618

17-
var singleFilename = "tests/cases/fourslash/declSingleFile";
19+
var singleFilename = "declSingleFile";
1820
var jsFilename = singleFilename + ".js";
1921
var declFilename = singleFilename + ".d.ts";
20-
edit.enableSingleOutputFile(jsFilename);
21-
edit.enableDeclaration();
2222
var outputFilenames = jsFilename + " " + declFilename;
23-
verify.emitOutput(EmitOutputResult.Succeeded, outputFilenames);
23+
verify.emitOutput(EmitReturnStatus.Succeeded, outputFilenames);

tests/cases/fourslash/getEmitOutputNoErrors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
//// y: string;
88
//// }
99

10-
verify.emitOutput(EmitOutputResult.Succeeded, "tests/cases/fourslash/noErrorsResult.js");
10+
verify.emitOutput(EmitReturnStatus.Succeeded, "tests/cases/fourslash/noErrorsResult.js");

tests/cases/fourslash/getEmitOutputSingleFile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference path="fourslash.ts" />
22

3+
// @out: tests/cases/fourslash/singleFile.js
34
// @Filename: inputFile1.ts
45
//// var x: any;
56
//// class Bar {
@@ -15,5 +16,4 @@
1516
//// }
1617

1718
var outputFilename = "tests/cases/fourslash/singleFile.js";
18-
edit.enableSingleOutputFile(outputFilename);
19-
verify.emitOutput(EmitOutputResult.Succeeded, outputFilename);
19+
verify.emitOutput(EmitReturnStatus.Succeeded, outputFilename);

tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
//// var x:number = "hello world";
55

66
// Only generate javscript file. The semantic error should not affect it
7-
verify.emitOutput(EmitOutputResult.Succeeded,"tests/cases/fourslash/semanticErrorsResult.js");
7+
verify.emitOutput(EmitReturnStatus.JSGeneratedWithSemanticErrors,"tests/cases/fourslash/semanticErrorsResult.js");
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/// <reference path="fourslash.ts" />
22

3+
// @declaration: true
34
// @Filename: semanticErrorsResult2.ts
45
//// var x:number = "hello world";
56

6-
edit.enableDeclaration();
77
// Fail to generate .d.ts file due to semantic error but succeeded in generate javascript file
8-
verify.emitOutput(EmitOutputResult.FailedToGenerateDeclarationsBecauseOfSemanticErrors,"tests/cases/fourslash/semanticErrorsResult2.js");
8+
verify.emitOutput(EmitReturnStatus.DeclarationGenerationSkipped,"tests/cases/fourslash/semanticErrorsResult2.js");

tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
// @Filename: getEmitOutputWithSyntaxErrorsResult.ts
44
//// var x:
55

6-
verify.emitOutput(EmitOutputResult.FailedBecauseOfSyntaxErrors);
6+
verify.emitOutput(EmitReturnStatus.AllOutputGenerationSkipped);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/// <reference path="fourslash.ts" />
22

3+
// @declaration
34
// @Filename: syntaxErrorsResult2.ts
45
//// var x;
56
//// class M {
67
//// x : string;
78
//// y : numer
89

9-
edit.enableDeclaration();
10-
verify.emitOutput(EmitOutputResult.FailedBecauseOfSyntaxErrors);
10+
verify.emitOutput(EmitReturnStatus.AllOutputGenerationSkipped);

0 commit comments

Comments
 (0)