mirror of
https://github.com/nodejs/node.git
synced 2025-05-08 23:23:46 +00:00

PR-URL: https://github.com/nodejs/node/pull/39175 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
12 lines
262 B
JavaScript
12 lines
262 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
assert.throws(
|
|
() => require('../fixtures/es-modules/test-esm-ok.mjs'),
|
|
{
|
|
message: /dynamic import\(\) which is available in all CommonJS modules/,
|
|
code: 'ERR_REQUIRE_ESM'
|
|
}
|
|
);
|