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 31, 2021
1 parent 321b151 commit 5ce1fd6
Show file tree
Hide file tree
Showing 7 changed files with 7 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 @@ -25,7 +25,7 @@ const importStatementMultiline = `import {
let stderr = '';
child.stderr.setEncoding('utf8');
child.stderr.on('data', (data) => {
stderr += data;
stderr += data.toString();
});
child.on('close', () => {
// SyntaxError: The requested module './module-named-exports.mjs'
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 @@ -12,7 +12,7 @@ const child = spawn(execPath, [
let stderr = '';
child.stderr.setEncoding('utf8');
child.stderr.on('data', (data) => {
stderr += data;
stderr += data.toString();
});
child.on('close', () => {
// SyntaxError: The requested module '../experimental.json'
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-esm-loader-not-found.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const child = spawn(execPath, [
let stderr = '';
child.stderr.setEncoding('utf8');
child.stderr.on('data', (data) => {
stderr += data;
stderr += data.toString();
});
child.on('close', () => {
// Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'i-dont-exist'
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-esm-loader-obsolete-hooks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const child = spawn(execPath, [
let stderr = '';
child.stderr.setEncoding('utf8');
child.stderr.on('data', (data) => {
stderr += data;
stderr += data.toString();
});
child.on('close', () => {
ok(stderr.includes(
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-esm-loader-with-syntax-error.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const child = spawn(execPath, [
let stderr = '';
child.stderr.setEncoding('utf8');
child.stderr.on('data', (data) => {
stderr += data;
stderr += data.toString();
});
child.on('close', () => {
ok(stderr.includes('SyntaxError:'));
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 @@ -26,7 +26,7 @@ import { execPath } from 'process';
let stderr = '';
child.stderr.setEncoding('utf8');
child.stderr.on('data', (data) => {
stderr += data;
stderr += data.toString();
});
child.on('close', () => {
ok(stderr.includes(expected));
Expand Down
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 @@ -11,7 +11,7 @@ const child = spawn(execPath, [
let stderr = '';
child.stderr.setEncoding('utf8');
child.stderr.on('data', (data) => {
stderr += data;
stderr += data.toString();
});
child.on('close', () => {
ok(stderr.includes('SyntaxError:'));
Expand Down

0 comments on commit 5ce1fd6

Please sign in to comment.