Skip to content

Commit

Permalink
test: remove duplicated test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoutsiaris authored and aduh95 committed Aug 20, 2024
1 parent 7c76fa0 commit 4e93a87
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 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 @@ -98,7 +98,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
4 changes: 2 additions & 2 deletions test/es-module/test-typescript.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,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 @@ -288,7 +288,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',
'--no-warnings',
Expand Down

0 comments on commit 4e93a87

Please sign in to comment.