Skip to content

Commit

Permalink
try to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Sep 10, 2023
1 parent fa99686 commit 7fcfcdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions test/command-publish.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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') }
}
})
Expand Down
2 changes: 1 addition & 1 deletion test/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down

0 comments on commit 7fcfcdc

Please sign in to comment.