Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test coverage: add test case to confirm that moduleType overrides are…
… applied for ts-node in loader mode
- Loading branch information
1 parent
dcbd916
commit c9c443c
Showing
4 changed files
with
19 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const cjs: boolean = true; | ||
|
||
export const requireType = typeof require; |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
export const cjs: boolean = true; | ||
|
||
export const requireType = typeof require; |
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,7 @@ | ||
import assert from 'assert'; | ||
|
||
import cjsSubdirCJS from './src/cjs-subdir'; | ||
import cjsSubdirESM from './src/cjs-subdir/esm-exception'; | ||
|
||
assert(cjsSubdirCJS.requireType === 'function'); | ||
assert(cjsSubdirESM.requireType === 'undefined'); |