mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
15 lines
362 B
JavaScript
15 lines
362 B
JavaScript
|
// Flags: --experimental-require-module
|
||
|
'use strict';
|
||
|
|
||
|
const common = require('../common');
|
||
|
const assert = require('assert');
|
||
|
|
||
|
(async () => {
|
||
|
await import('../fixtures/es-modules/tla/resolved.mjs');
|
||
|
assert.throws(() => {
|
||
|
require('../fixtures/es-modules/tla/resolved.mjs');
|
||
|
}, {
|
||
|
code: 'ERR_REQUIRE_ASYNC_MODULE',
|
||
|
});
|
||
|
})().then(common.mustCall());
|