Skip to content

Commit

Permalink
fixup! fix: run input.start around help and openining urls
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed May 2, 2024
1 parent 270d9c3 commit 9e4f02c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions mock-registry/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ class MockRegistry {
this.nock = this.nock
.post(this.fullPath('/-/v1/login'), body => {
this.#tap.ok(body.create) // Sole difference from weblogin
this.#tap.ok(body.hostname)
return true
})
.reply(200, { doneUrl, loginUrl })
Expand All @@ -243,8 +242,7 @@ class MockRegistry {
const doneUrl = new URL('/npm-cli-test/done', this.origin).href
const loginUrl = new URL('/npm-cli-test/login', this.origin).href
this.nock = this.nock
.post(this.fullPath('/-/v1/login'), body => {
this.#tap.ok(body.hostname)
.post(this.fullPath('/-/v1/login'), () => {
return true
})
.reply(200, { doneUrl, loginUrl })
Expand Down
4 changes: 1 addition & 3 deletions test/lib/commands/adduser.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ const MockRegistry = require('@npmcli/mock-registry')
const stream = require('stream')

const mockAddUser = async (t, { stdin: stdinLines, registry: registryUrl, ...options } = {}) => {
let stdin
if (stdinLines) {
stdin = new stream.PassThrough()
const stdin = new stream.PassThrough()
for (const l of stdinLines) {
stdin.write(l + '\n')
}
Expand All @@ -30,7 +29,6 @@ const mockAddUser = async (t, { stdin: stdinLines, registry: registryUrl, ...opt
})
return {
registry,
stdin,
rc: () => ini.parse(fs.readFileSync(path.join(mock.home, '.npmrc'), 'utf8')),
...mock,
}
Expand Down

0 comments on commit 9e4f02c

Please sign in to comment.