Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-esm-scope-node-modules.mjs « es-module « test - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0be4194aeb9b4d59a978ab88e205d3bf44a4761e (plain)
1
2
3
4
5
6
7
8
9
import '../common/index.mjs';
import cjs from '../fixtures/baz.js';
import { message } from '../fixtures/es-modules/message.mjs';
import assert from 'assert';

// Assert we loaded esm dependency as ".js" in this mode
assert.strictEqual(message, 'A message');
// Assert we loaded CommonJS dependency
assert.strictEqual(cjs, 'perhaps I work');