0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-25 08:19:38 +01:00
nodejs/test/es-module/test-esm-custom-exports.mjs
Guy Bedford 3ad4fa01eb cli: add -C alias for --conditions flag
PR-URL: https://github.com/nodejs/node/pull/38755
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
2021-05-25 15:13:36 +02:00

11 lines
416 B
JavaScript

// Flags: --conditions=custom-condition -C another
import { mustCall } from '../common/index.mjs';
import { strictEqual } from 'assert';
import { requireFixture, importFixture } from '../fixtures/pkgexports.mjs';
[requireFixture, importFixture].forEach((loadFixture) => {
loadFixture('pkgexports/condition')
.then(mustCall((actual) => {
strictEqual(actual.default, 'from custom condition');
}));
});