mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
052434a0c1
PR-URL: https://github.com/nodejs/node/pull/49136 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
13 lines
527 B
JavaScript
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()] });
|