From 7fcfcdc7184bb8ac794b14e12a834c52d134c40a Mon Sep 17 00:00:00 2001 From: Uzlopak Date: Sun, 10 Sep 2023 11:02:01 +0200 Subject: [PATCH] try to fix --- test/command-publish.test.js | 8 ++++---- test/helper.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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 })