mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
esm: make extension-less errors in type:module actionable
PR-URL: https://github.com/nodejs/node/pull/42301 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
1 parent
6f8c983f90
commit
a01302b8df
5 files changed
+35
-13
No files matched your search
@@ -31,6 +31,10 @@ const assert = require('assert');
|
||||
assert.strictEqual(code, 1);
|
||||
assert.strictEqual(signal, null);
|
||||
assert.strictEqual(stdout, '');
|
||||
assert.ok(stderr.indexOf('ERR_UNKNOWN_FILE_EXTENSION') !== -1);
|
||||
assert.ok(stderr.includes('ERR_UNKNOWN_FILE_EXTENSION'));
|
||||
if (fixturePath.includes('noext')) {
|
||||
// Check for explanation to users
|
||||
assert.ok(stderr.includes('extensionless'));
|
||||
}
|
||||
}));
|
||||
});
|
||||
Reference in new issue
Block a user