node/test/fixtures/watch-mode/ipc.js
Livia Medeiros 052434a0c1
test: use tmpdir.resolve()
PR-URL: https://github.com/nodejs/node/pull/49136
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-21 16:41:53 +00:00

13 lines
527 B
JavaScript

const path = require('node:path');
const url = require('node:url');
const fs = require('node:fs');
const tmpdir = require('../../common/tmpdir');
const tmpfile = tmpdir.resolve('file');
fs.writeFileSync(tmpfile, '');
process.send({ 'watch:require': [path.resolve(__filename)] });
process.send({ 'watch:import': [url.pathToFileURL(path.resolve(__filename)).toString()] });
process.send({ 'watch:import': [url.pathToFileURL(tmpfile).toString()] });
process.send({ 'watch:import': [new URL('http://invalid.com').toString()] });