0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00
nodejs/test/parallel/test-process-default.js
Antoine du Hamel a7729737cf
module: fix crash when built-in module export a default key
PR-URL: https://github.com/nodejs/node/pull/51481
Fixes: https://github.com/nodejs/node/issues/51480
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2024-01-19 08:42:07 +00:00

9 lines
238 B
JavaScript

'use strict';
const common = require('../common');
const assert = require('node:assert');
process.default = 1;
import('node:process').then(common.mustCall((processModule) => {
assert.strictEqual(processModule.default.default, 1);
}));