Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup: exports deprecation check tests
  • Loading branch information
guybedford committed Sep 8, 2021
commit 266a0a6d9ccaa9fe2e1d8f72c7957662117169f8
4 changes: 4 additions & 0 deletions test/es-module/test-esm-exports-deprecations.mjs
Original file line number Diff line number Diff line change
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');
Comment thread
guybedford marked this conversation as resolved.
Resolved
}, expectedWarnings.length));

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