mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
PR-URL: https://github.com/nodejs/node/pull/40121 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
16 lines
404 B
JavaScript
16 lines
404 B
JavaScript
import { mustCall } from '../common/index.mjs';
|
|
import assert from 'assert';
|
|
|
|
let curWarning = 0;
|
|
const expectedWarnings = [
|
|
'"./trailing-pattern-slash/"',
|
|
'no_exports',
|
|
'default_index',
|
|
];
|
|
|
|
process.addListener('warning', mustCall((warning) => {
|
|
assert(warning.stack.includes(expectedWarnings[curWarning++]), warning.stack);
|
|
}, expectedWarnings.length));
|
|
|
|
await import('./test-esm-exports.mjs');
|