mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
6948a95562
PR-URL: https://github.com/nodejs/node/pull/28474 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
15 lines
389 B
JavaScript
15 lines
389 B
JavaScript
// Flags: --experimental-modules
|
|
import '../common/index.mjs';
|
|
import * as fs from 'fs';
|
|
import assert from 'assert';
|
|
import Module from 'module';
|
|
|
|
const keys = Object.entries(
|
|
Object.getOwnPropertyDescriptors(new Module().require('fs')))
|
|
.filter(([ , d]) => d.enumerable)
|
|
.map(([name]) => name)
|
|
.concat('default')
|
|
.sort();
|
|
|
|
assert.deepStrictEqual(keys, Object.keys(fs).sort());
|