0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/es-module/test-esm-namespace.mjs

15 lines
382 B
JavaScript
Raw Normal View History

// Flags: --experimental-modules
import '../common';
import * as fs from 'fs';
import assert from 'assert';
import Module from 'module';
const keys = Object.entries(
Object.getOwnPropertyDescriptors(new Module().require('fs')))
.filter(([name, d]) => d.enumerable)
.map(([name]) => name)
.concat('default')
.sort();
assert.deepStrictEqual(Object.keys(fs).sort(), keys);