Skip to content

Commit

Permalink
test: remove duplicated test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
unseen1980 committed Aug 28, 2024
1 parent 49a9ba4 commit 94ee9b9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions lib/internal/modules/cjs/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,11 @@ function getMaybeCachedSource(mod, filename) {
return content;
}

/**
* Built-in handler for `.cts` files.
* @param {Module} module The module to compile
* @param {string} filename The file path of the module
*/
function loadCTS(module, filename) {
if (isUnderNodeModules(filename)) {
throw new ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING(filename);
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-typescript-eval.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ test('expect fail eval TypeScript CommonJS syntax with input-type module', async
strictEqual(result.code, 1);
});

test('expect fail eval TypeScript CommonJS syntax with input-type module', async () => {
test('expect fail eval TypeScript ESM syntax with input-type commonjs', async () => {
const result = await spawnPromisified(process.execPath, [
'--experimental-strip-types',
'--input-type=commonjs',
Expand Down
1 change: 0 additions & 1 deletion test/es-module/test-typescript-module.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ test('execute an .mts file importing a .cts file', async () => {
const result = await spawnPromisified(process.execPath, [
'--experimental-strip-types',
'--no-warnings',
'--no-warnings',
fixtures.path('typescript/mts/test-import-commonjs.mts'),
]);

Expand Down
4 changes: 2 additions & 2 deletions test/es-module/test-typescript.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ test('execute a TypeScript file with CommonJS syntax requiring .mts', async () =
strictEqual(result.code, 1);
});

test('execute a TypeScript file with CommonJS syntax requiring .mts with require-module', async () => {
test('execute a TypeScript file with CommonJS syntax requiring .mts using require-module', async () => {
const result = await spawnPromisified(process.execPath, [
'--experimental-strip-types',
'--experimental-require-module',
Expand All @@ -215,7 +215,7 @@ test('execute a TypeScript file with CommonJS syntax requiring .mts with require
strictEqual(result.code, 0);
});

test('execute a TypeScript file with CommonJS syntax requiring .mts with require-module', async () => {
test('execute a TypeScript file with CommonJS syntax requiring .cts using commonjs', async () => {
const result = await spawnPromisified(process.execPath, [
'--experimental-strip-types',
'--experimental-default-type=commonjs',
Expand Down

0 comments on commit 94ee9b9

Please sign in to comment.