-
Notifications
You must be signed in to change notification settings - Fork 13.8k
chore: remove outFile,module:amd config from test cases
#64122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Jake Bailey (jakebailey)
merged 16 commits into
microsoft:main
from
camc314:c/test-cov-8013-8016
Sep 3, 2026
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
06f0f3e
test: remove outFile-specific test cases
camc314 9d89225
test: remove incidental outFile options
camc314 5f8cad7
test: remove AMD-specific test cases
camc314 cbf5623
test: remove incidental AMD module options
camc314 5f3eef8
test: reject outFile and AMD test options
camc314 0164435
Keep the triple-slash comment emit coverage
camc314 3007025
Drop the duplicated classic path mapping test
camc314 3b74e9d
Remove duplicate export assignment source map coverage
camc314 62c5f22
Remove the stale using declaration baseline
camc314 987c8e5
Preserve CRLF endings in compiler fixtures
camc314 1a68930
Remove the duplicate synthetic default import test
camc314 568f7ce
Retire the AMD-specific JSX emit test
camc314 bbb8283
Remove duplicate destructuring module tests
camc314 cb615cb
Remove the last legacy outFile fixture
camc314 5a7da7f
Check compiler options in fourslash configs
camc314 d10c044
chore: revert forslash config validation
camc314 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
tsc/internal/fourslash/tests/completionsPathsJsonModuleWithAmd_test.go
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
tsc/internal/fourslash/tests/importNameCodeFixNewImportAllowSyntheticDefaultImports4_test.go
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...stdata/baselines/reference/compiler/ambientExternalModuleWithInternalImportDeclaration.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| //// [tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration.ts] //// | ||
|
|
||
| //// [ambientExternalModuleWithInternalImportDeclaration_0.ts] | ||
| declare module 'M' { | ||
| namespace C { | ||
| export var f: number; | ||
| } | ||
| class C { | ||
| foo(): void; | ||
| } | ||
| import X = C; | ||
| export = X; | ||
|
|
||
| } | ||
|
|
||
| //// [ambientExternalModuleWithInternalImportDeclaration_1.ts] | ||
| ///<reference path='ambientExternalModuleWithInternalImportDeclaration_0.ts'/> | ||
| import A = require('M'); | ||
| var c = new A(); | ||
|
|
||
| //// [ambientExternalModuleWithInternalImportDeclaration_0.js] | ||
| "use strict"; | ||
| //// [ambientExternalModuleWithInternalImportDeclaration_1.js] | ||
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| ///<reference path='ambientExternalModuleWithInternalImportDeclaration_0.ts'/> | ||
| const A = require("M"); | ||
| var c = new A(); |
36 changes: 36 additions & 0 deletions
36
...a/baselines/reference/compiler/ambientExternalModuleWithInternalImportDeclaration.symbols
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| //// [tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration.ts] //// | ||
|
|
||
| === ambientExternalModuleWithInternalImportDeclaration_1.ts === | ||
| ///<reference path='ambientExternalModuleWithInternalImportDeclaration_0.ts'/> | ||
| import A = require('M'); | ||
| >A : Symbol(A, Decl(ambientExternalModuleWithInternalImportDeclaration_1.ts, 0, 0)) | ||
|
|
||
| var c = new A(); | ||
| >c : Symbol(c, Decl(ambientExternalModuleWithInternalImportDeclaration_1.ts, 2, 3)) | ||
| >A : Symbol(A, Decl(ambientExternalModuleWithInternalImportDeclaration_1.ts, 0, 0)) | ||
|
|
||
| === ambientExternalModuleWithInternalImportDeclaration_0.ts === | ||
| declare module 'M' { | ||
| >'M' : Symbol("M", Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 0)) | ||
|
|
||
| namespace C { | ||
| >C : Symbol(C, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 3, 5)) | ||
|
|
||
| export var f: number; | ||
| >f : Symbol(f, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 2, 18)) | ||
| } | ||
| class C { | ||
| >C : Symbol(C, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 3, 5)) | ||
|
|
||
| foo(): void; | ||
| >foo : Symbol(C.foo, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 4, 13)) | ||
| } | ||
| import X = C; | ||
| >X : Symbol(X, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 6, 5)) | ||
| >C : Symbol(C, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 3, 5)) | ||
|
|
||
| export = X; | ||
| >X : Symbol(X, Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 6, 5)) | ||
|
|
||
| } | ||
|
|
37 changes: 37 additions & 0 deletions
37
...ata/baselines/reference/compiler/ambientExternalModuleWithInternalImportDeclaration.types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| //// [tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration.ts] //// | ||
|
|
||
| === ambientExternalModuleWithInternalImportDeclaration_1.ts === | ||
| ///<reference path='ambientExternalModuleWithInternalImportDeclaration_0.ts'/> | ||
| import A = require('M'); | ||
| >A : typeof A | ||
|
|
||
| var c = new A(); | ||
| >c : A | ||
| >new A() : A | ||
| >A : typeof A | ||
|
|
||
| === ambientExternalModuleWithInternalImportDeclaration_0.ts === | ||
| declare module 'M' { | ||
| >'M' : typeof import("M") | ||
|
|
||
| namespace C { | ||
| >C : typeof C | ||
|
|
||
| export var f: number; | ||
| >f : number | ||
| } | ||
| class C { | ||
| >C : C | ||
|
|
||
| foo(): void; | ||
| >foo : () => void | ||
| } | ||
| import X = C; | ||
| >X : typeof C | ||
| >C : C | ||
|
|
||
| export = X; | ||
| >X : C | ||
|
|
||
| } | ||
|
|
27 changes: 27 additions & 0 deletions
27
...ata/baselines/reference/compiler/ambientExternalModuleWithoutInternalImportDeclaration.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| //// [tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration.ts] //// | ||
|
|
||
| //// [ambientExternalModuleWithoutInternalImportDeclaration_0.ts] | ||
| declare module 'M' { | ||
| namespace C { | ||
| export var f: number; | ||
| } | ||
| class C { | ||
| foo(): void; | ||
| } | ||
| export = C; | ||
|
|
||
| } | ||
|
|
||
| //// [ambientExternalModuleWithoutInternalImportDeclaration_1.ts] | ||
| ///<reference path='ambientExternalModuleWithoutInternalImportDeclaration_0.ts'/> | ||
| import A = require('M'); | ||
| var c = new A(); | ||
|
|
||
| //// [ambientExternalModuleWithoutInternalImportDeclaration_0.js] | ||
| "use strict"; | ||
| //// [ambientExternalModuleWithoutInternalImportDeclaration_1.js] | ||
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| ///<reference path='ambientExternalModuleWithoutInternalImportDeclaration_0.ts'/> | ||
| const A = require("M"); | ||
| var c = new A(); |
32 changes: 32 additions & 0 deletions
32
...aselines/reference/compiler/ambientExternalModuleWithoutInternalImportDeclaration.symbols
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| //// [tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration.ts] //// | ||
|
|
||
| === ambientExternalModuleWithoutInternalImportDeclaration_1.ts === | ||
| ///<reference path='ambientExternalModuleWithoutInternalImportDeclaration_0.ts'/> | ||
| import A = require('M'); | ||
| >A : Symbol(A, Decl(ambientExternalModuleWithoutInternalImportDeclaration_1.ts, 0, 0)) | ||
|
|
||
| var c = new A(); | ||
| >c : Symbol(c, Decl(ambientExternalModuleWithoutInternalImportDeclaration_1.ts, 2, 3)) | ||
| >A : Symbol(A, Decl(ambientExternalModuleWithoutInternalImportDeclaration_1.ts, 0, 0)) | ||
|
|
||
| === ambientExternalModuleWithoutInternalImportDeclaration_0.ts === | ||
| declare module 'M' { | ||
| >'M' : Symbol("M", Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 0)) | ||
|
|
||
| namespace C { | ||
| >C : Symbol(C, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 3, 5)) | ||
|
|
||
| export var f: number; | ||
| >f : Symbol(f, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 2, 18)) | ||
| } | ||
| class C { | ||
| >C : Symbol(C, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 3, 5)) | ||
|
|
||
| foo(): void; | ||
| >foo : Symbol(C.foo, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 4, 13)) | ||
| } | ||
| export = C; | ||
| >C : Symbol(C, Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 20), Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 3, 5)) | ||
|
|
||
| } | ||
|
|
33 changes: 33 additions & 0 deletions
33
.../baselines/reference/compiler/ambientExternalModuleWithoutInternalImportDeclaration.types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| //// [tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration.ts] //// | ||
|
|
||
| === ambientExternalModuleWithoutInternalImportDeclaration_1.ts === | ||
| ///<reference path='ambientExternalModuleWithoutInternalImportDeclaration_0.ts'/> | ||
| import A = require('M'); | ||
| >A : typeof A | ||
|
|
||
| var c = new A(); | ||
| >c : A | ||
| >new A() : A | ||
| >A : typeof A | ||
|
|
||
| === ambientExternalModuleWithoutInternalImportDeclaration_0.ts === | ||
| declare module 'M' { | ||
| >'M' : typeof import("M") | ||
|
|
||
| namespace C { | ||
| >C : typeof C | ||
|
|
||
| export var f: number; | ||
| >f : number | ||
| } | ||
| class C { | ||
| >C : C | ||
|
|
||
| foo(): void; | ||
| >foo : () => void | ||
| } | ||
| export = C; | ||
| >C : C | ||
|
|
||
| } | ||
|
|
10 changes: 0 additions & 10 deletions
10
tsc/testdata/baselines/reference/compiler/amdDependencyComment1.errors.txt
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
tsc/testdata/baselines/reference/compiler/amdDependencyComment1.js
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
tsc/testdata/baselines/reference/compiler/amdDependencyComment1.symbols
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the skips here? Is this leftover from you finding tests to fix? I'd hope we would still error if someone tries to introduce them somehow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It felt like the logical thing to do. But I see your point - let me push a commit that does t.Fail() if an old compiler option is specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah there's actually a bunch of stuff here I missed - let me take another proper look - apologies for marking it draft a little too early!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now - I've changed these cases to fail with
t.Fatalfrather than silently skip. This flagged some other issues, so I've changed those tests usingoutFiletooutDir, andmodule:amdtomodule:commonjswhere needed to prevent excess diagnosticsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks; I wonder how much more it'd take to do this for all of the other options.
Probably also the func is misnamed but, it is somewhat temporary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to send followup PRs if this is directionally right - these were the first two I noticed that caused us issues. But I don't want to make this any harder to review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sort of surprised this matters for you at all? These are our internal tests, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We read all of the fixtures to know what we should be succeeding/failing to parse. (since there's not really a TS conformance suite anywhere).
Since some of these have no
errors.txt(because they were skipped), our harness was expecting these to parse without errors (incorrect behaviour)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could just filter out cases that are skipped here, but then we risk not testing everything and possibly introducing regressions.