Skip to content

Commit

Permalink
fixup: exports deprecation check tests
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Sep 8, 2021
1 parent 819aa31 commit 266a0a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/es-module/test-esm-exports-deprecations.mjs
Expand Up @@ -5,13 +5,17 @@ let curWarning = 0;
const expectedWarnings = [
'"./sub/"',
'"./fallbackdir/"',
'"./trailing-pattern-slash/"',
'"./subpath/"',
'"./subpath/dir1/"',
'"./subpath/dir2/"',
'no_exports',
'default_index',
];

process.addListener('warning', mustCall((warning) => {
assert(warning.stack.includes(expectedWarnings[curWarning++]), warning.stack);
console.log(expectedWarnings[curWarning - 1] + ' passed');
}, expectedWarnings.length));

await import('./test-esm-exports.mjs');

0 comments on commit 266a0a6

Please sign in to comment.