mirror of
https://github.com/nodejs/node.git
synced 2024-11-22 07:37:56 +01:00
15f10515e3
PR-URL: https://github.com/nodejs/node/pull/44883 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
28 lines
725 B
JavaScript
28 lines
725 B
JavaScript
// Flags: --pending-deprecation
|
|
import { mustCall } from '../common/index.mjs';
|
|
import assert from 'assert';
|
|
|
|
let curWarning = 0;
|
|
const expectedWarnings = [
|
|
'Use of deprecated double slash',
|
|
'Use of deprecated double slash',
|
|
'./sub//null',
|
|
'./sub/////null',
|
|
'./sub//internal/test',
|
|
'./sub//internal//test',
|
|
'#subpath/////internal',
|
|
'#subpath//asdf.asdf',
|
|
'#subpath/as//df.asdf',
|
|
'./sub//null',
|
|
'./sub/////null',
|
|
'./sub//internal/test',
|
|
'./sub//internal//test',
|
|
'#subpath/////internal',
|
|
];
|
|
|
|
process.addListener('warning', mustCall((warning) => {
|
|
assert(warning.stack.includes(expectedWarnings[curWarning++]), warning.stack);
|
|
}, expectedWarnings.length));
|
|
|
|
await import('./test-esm-imports.mjs');
|