mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
PR-URL: https://github.com/nodejs/node/pull/60891 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
17 lines
457 B
JavaScript
17 lines
457 B
JavaScript
// This tests that after failing to require an ESM that contains TLA,
|
|
// retrying with require() still throws, and produces consistent results.
|
|
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
assert.throws(() => {
|
|
require('../fixtures/es-modules/tla/resolved.mjs');
|
|
}, {
|
|
code: 'ERR_REQUIRE_ASYNC_MODULE',
|
|
});
|
|
assert.throws(() => {
|
|
require('../fixtures/es-modules/tla/resolved.mjs');
|
|
}, {
|
|
code: 'ERR_REQUIRE_ASYNC_MODULE',
|
|
});
|