-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test case for extension name !== emitExtension
- Loading branch information
1 parent
f318039
commit 5b9ffb0
Showing
10 changed files
with
63 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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 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
3 changes: 1 addition & 2 deletions
3
tests/baselines/reference/emitExtensionRejectResolveTSFile.symbols
This file contains 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
3 changes: 1 addition & 2 deletions
3
tests/baselines/reference/emitExtensionRejectResolveTSFile.types
This file contains 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
12 changes: 12 additions & 0 deletions
12
tests/baselines/reference/emitExtensionUnknownExtension.errors.txt
This file contains 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,12 @@ | ||
tests/cases/compiler/1.ts(1,17): error TS2307: Cannot find module './0.cjs'. | ||
|
||
|
||
==== tests/cases/compiler/0.ts (0 errors) ==== | ||
export default 0 | ||
|
||
==== tests/cases/compiler/1.ts (1 errors) ==== | ||
import num from './0.cjs' | ||
~~~~~~~~~ | ||
!!! error TS2307: Cannot find module './0.cjs'. | ||
num + 1 | ||
|
19 changes: 19 additions & 0 deletions
19
tests/baselines/reference/emitExtensionUnknownExtension.js
This file contains 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,19 @@ | ||
//// [tests/cases/compiler/emitExtensionUnknownExtension.ts] //// | ||
|
||
//// [0.ts] | ||
export default 0 | ||
|
||
//// [1.ts] | ||
import num from './0.cjs' | ||
num + 1 | ||
|
||
|
||
//// [0.mjs] | ||
"use strict"; | ||
exports.__esModule = true; | ||
exports["default"] = 0; | ||
//// [1.mjs] | ||
"use strict"; | ||
exports.__esModule = true; | ||
var _0_cjs_1 = require("./0.cjs"); | ||
_0_cjs_1["default"] + 1; |
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/emitExtensionUnknownExtension.symbols
This file contains 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,10 @@ | ||
=== tests/cases/compiler/0.ts === | ||
export default 0 | ||
No type information for this code. | ||
No type information for this code.=== tests/cases/compiler/1.ts === | ||
import num from './0.cjs' | ||
>num : Symbol(num, Decl(1.ts, 0, 6)) | ||
|
||
num + 1 | ||
>num : Symbol(num, Decl(1.ts, 0, 6)) | ||
|
12 changes: 12 additions & 0 deletions
12
tests/baselines/reference/emitExtensionUnknownExtension.types
This file contains 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,12 @@ | ||
=== tests/cases/compiler/0.ts === | ||
export default 0 | ||
No type information for this code. | ||
No type information for this code.=== tests/cases/compiler/1.ts === | ||
import num from './0.cjs' | ||
>num : any | ||
|
||
num + 1 | ||
>num + 1 : any | ||
>num : any | ||
>1 : 1 | ||
|
This file contains 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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
// @outDir: ../out/ | ||
|
||
// @Filename: 0.ts | ||
// For the deno case | ||
export default 0 | ||
|
||
// @Filename: 1.ts | ||
|
This file contains 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,8 @@ | ||
// @emitExtension: .mjs | ||
|
||
// @Filename: 0.ts | ||
export default 0 | ||
|
||
// @Filename: 1.ts | ||
import num from './0.cjs' | ||
num + 1 |