Skip to content

Commit

Permalink
fixup! esm: refactor esm tests out of test/message
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyBooth committed Dec 30, 2021
1 parent c828d46 commit eaf4cba
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/es-module/test-esm-export-not-found.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const importStatementMultiline = `import {
stderr += data;
});
child.on('close', () => {
ok(stderr.toString().includes(
ok(stderr.includes(
'SyntaxError: The requested module \'./module-named-exports.mjs\' ' +
'does not provide an export named \'notfound\''
));
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-esm-import-json-named-export.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ child.stderr.on('data', (data) => {
stderr += data;
});
child.on('close', () => {
ok(stderr.toString().includes(
ok(stderr.includes(
'SyntaxError: The requested module \'../experimental.json\' ' +
'does not provide an export named \'ofLife\''
));
Expand Down
1 change: 0 additions & 1 deletion test/es-module/test-esm-loader-not-found.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ child.stderr.on('data', (data) => {
stderr += data;
});
child.on('close', () => {
stderr = stderr.toString();
ok(stderr.includes(
'Error [ERR_MODULE_NOT_FOUND]: Cannot find package \'i-dont-exist\' ' +
'imported from'
Expand Down
1 change: 0 additions & 1 deletion test/es-module/test-esm-loader-obsolete-hooks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ child.stderr.on('data', (data) => {
stderr += data;
});
child.on('close', () => {
stderr = stderr.toString();
ok(stderr.includes(
'DeprecationWarning: Obsolete loader hook(s) supplied and will be ' +
'ignored: dynamicInstantiate, getFormat, getSource, transformSource'
Expand Down
1 change: 0 additions & 1 deletion test/es-module/test-esm-loader-with-syntax-error.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ child.stderr.on('data', (data) => {
stderr += data;
});
child.on('close', () => {
stderr = stderr.toString();
ok(stderr.includes(
'SyntaxError: Malformed arrow function parameter list'
));
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-esm-module-not-found-commonjs-hint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ import { execPath } from 'process';
stderr += data;
});
child.on('close', () => {
ok(stderr.toString().includes(expected));
ok(stderr.includes(expected));
});
});
2 changes: 1 addition & 1 deletion test/es-module/test-esm-syntax-error.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ child.stderr.on('data', (data) => {
stderr += data;
});
child.on('close', () => {
ok(stderr.toString().includes(
ok(stderr.includes(
'SyntaxError: Malformed arrow function parameter list'
));
});

0 comments on commit eaf4cba

Please sign in to comment.