Files
Kmake/test/addons/esm/test-import-package.js
2026-05-26 23:36:42 -07:00

16 lines
382 B
JavaScript

// Flags: --experimental-addon-modules
'use strict';
const common = require('../../common');
const assert = require('node:assert');
/**
* Test that the export condition `node-addons` can be used
* with `*.node` files with the ESM loader.
*/
import('esm-package/binding')
.then((mod) => {
assert.strictEqual(mod.default.hello(), 'world');
})
.then(common.mustCall());