Files
node/test/es-module/test-esm-import-attributes-2.mjs
2025-11-07 09:24:01 +01:00

12 lines
364 B
JavaScript

import '../common/index.mjs';
import assert from 'assert';
import secret0 from '../fixtures/experimental.json' with { type: 'json' };
const secret1 = await import('../fixtures/experimental.json', {
with: { type: 'json' },
});
assert.strictEqual(secret0.ofLife, 42);
assert.strictEqual(secret1.default.ofLife, 42);
assert.strictEqual(secret1.default, secret0);