1// Flags: --pending-deprecation 2import { mustCall } from '../common/index.mjs'; 3import assert from 'assert'; 4 5let curWarning = 0; 6const expectedWarnings = [ 7 'Use of deprecated double slash', 8 'Use of deprecated double slash', 9 './sub//null', 10 './sub/////null', 11 './sub//internal/test', 12 './sub//internal//test', 13 '#subpath/////internal', 14 '#subpath//asdf.asdf', 15 '#subpath/as//df.asdf', 16 './sub//null', 17 './sub/////null', 18 './sub//internal/test', 19 './sub//internal//test', 20 '#subpath/////internal', 21]; 22 23process.addListener('warning', mustCall((warning) => { 24 assert(warning.stack.includes(expectedWarnings[curWarning++]), warning.stack); 25}, expectedWarnings.length)); 26 27await import('./test-esm-imports.mjs'); 28