mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

PR-URL: https://github.com/nodejs/node/pull/55844 Fixes: https://github.com/nodejs/node/issues/40541 Fixes: https://github.com/nodejs/node/issues/55821 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
15 lines
382 B
JavaScript
15 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());
|