test: use assert.match
in test-esm-import-meta
PR-URL: https://github.com/nodejs/node/pull/57290 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
parent
8032e96cc8
commit
365faa7a4f
@ -17,7 +17,7 @@ for (const descriptor of Object.values(descriptors)) {
|
||||
}
|
||||
|
||||
const urlReg = /^file:\/\/\/.*\/test\/es-module\/test-esm-import-meta\.mjs$/;
|
||||
assert(import.meta.url.match(urlReg));
|
||||
assert.match(import.meta.url, urlReg);
|
||||
|
||||
// Match *nix paths: `/some/path/test/es-module`
|
||||
// Match Windows paths: `d:\\some\\path\\test\\es-module`
|
||||
|
Loading…
x
Reference in New Issue
Block a user