test: fix timing issue in utilityProcess
test fixtures (#45964)
* fix: potential timing issue in utilityProcess test * fix: potential timing issue in utilityProcess esm test
This commit is contained in:
parent
6e056709be
commit
22262c14f1
2 changed files with 8 additions and 4 deletions
|
@ -1,4 +1,6 @@
|
||||||
const dns = require('node:dns');
|
const dns = require('node:dns');
|
||||||
|
|
||||||
console.log(dns.getDefaultResultOrder());
|
const write = (writable, chunk) => new Promise((resolve) => writable.write(chunk, resolve));
|
||||||
process.exit(0);
|
|
||||||
|
write(process.stdout, `${dns.getDefaultResultOrder()}\n`)
|
||||||
|
.then(() => process.exit(0));
|
||||||
|
|
6
spec/fixtures/api/utility-process/esm.mjs
vendored
6
spec/fixtures/api/utility-process/esm.mjs
vendored
|
@ -1,2 +1,4 @@
|
||||||
console.log(import.meta.url);
|
const write = (writable, chunk) => new Promise((resolve) => writable.write(chunk, resolve));
|
||||||
process.exit(0);
|
|
||||||
|
write(process.stdout, `${import.meta.url}\n`)
|
||||||
|
.then(() => process.exit(0));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue