diff --git a/test/command-publish.test.js b/test/command-publish.test.js index 40fb1ca..8d3c00e 100644 --- a/test/command-publish.test.js +++ b/test/command-publish.test.js @@ -467,14 +467,14 @@ test('publish a module minor editing the release message', async t => { return { arguments: [] } } }, - child_process: { + 'node:child_process': { spawn: () => { const e = new EventEmitter() setImmediate(() => { e.emit('exit', 0) }) return e } }, - fs: { + 'node:fs': { readFile (tmpFile, opts, cb) { t.equal(tmpFile, fakeFile) cb(null, 'my message') @@ -524,14 +524,14 @@ test('editor error', t => { return { arguments: [] } } }, - child_process: { + 'node:child_process': { spawn: () => { const e = new EventEmitter() setImmediate(() => { e.emit('exit', 1) }) return e } }, - fs: { + 'node:fs': { readFile () { t.fail('The file has not been edited') } } }) diff --git a/test/helper.js b/test/helper.js index a66aa50..afc4d7e 100644 --- a/test/helper.js +++ b/test/helper.js @@ -30,7 +30,7 @@ function buildProxyCommand (commandPath, opts = {}) { '@octokit/rest': factoryOctokit(opts.github) }), '../npm': proxyquire('../lib/npm', { - child_process: factoryNpm(opts.npm) + 'node:child_process': factoryNpm(opts.npm) }), ...opts.external })