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
Alex Ramirez 6948a95562 test: fix assertion argument order in test-esm-namespace
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>
2019-07-20 22:33:14 -07:00

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());