2020-10-22 08:40:24 +08:00
|
|
|
import { mustCall } from '../common/index.mjs';
|
|
|
|
import assert from 'assert';
|
|
|
|
|
|
|
|
let curWarning = 0;
|
|
|
|
const expectedWarnings = [
|
2021-09-09 01:36:52 +08:00
|
|
|
'"./trailing-pattern-slash/"',
|
2021-01-14 05:09:17 +08:00
|
|
|
'no_exports',
|
2021-03-26 23:51:08 +08:00
|
|
|
'default_index',
|
2020-10-22 08:40:24 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
process.addListener('warning', mustCall((warning) => {
|
|
|
|
assert(warning.stack.includes(expectedWarnings[curWarning++]), warning.stack);
|
|
|
|
}, expectedWarnings.length));
|
|
|
|
|
2021-05-23 23:20:44 +08:00
|
|
|
await import('./test-esm-exports.mjs');
|