2024-04-16 22:07:44 +08:00
|
|
|
// Flags: --experimental-require-module
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
// This tests that previously synchronously loaded submodule can still
|
|
|
|
// be loaded by dynamic import().
|
|
|
|
|
|
|
|
const common = require('../common');
|
|
|
|
|
|
|
|
(async () => {
|
|
|
|
const required = require('../fixtures/es-modules/require-and-import/load.cjs');
|
|
|
|
const imported = await import('../fixtures/es-modules/require-and-import/load.mjs');
|
2024-03-21 04:41:22 +08:00
|
|
|
common.expectRequiredModule(required, imported);
|
2024-04-16 22:07:44 +08:00
|
|
|
})().then(common.mustCall());
|