Skip to content

Commit

Permalink
Remove ping debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Apr 11, 2024
1 parent 7b37a94 commit 7bc5682
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/commands/ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class Ping extends BaseCommand {
const cleanRegistry = cleanUrl(this.npm.config.get('registry'))
log.notice('PING', cleanRegistry)
const start = Date.now()
let details = await pingUtil({ ...this.npm.flatOptions })
details = { a: 1, b: 2 }
const details = await pingUtil({ ...this.npm.flatOptions })
const time = Date.now() - start
log.notice('PONG', `${time}ms`)
if (this.npm.config.get('json')) {
Expand Down
4 changes: 2 additions & 2 deletions test/lib/commands/ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ t.test('with details', async t => {
tap: t,
registry: npm.config.get('registry'),
})
registry.ping({ body: { test: true } })
registry.ping({ body: { test: true, test2: true } })
await npm.exec('ping', [])
t.match(logs.notice, [
`PING https://registry.npmjs.org/`,
/PONG [0-9]+ms/,
`PONG {\nPONG "a": 1,\nPONG "b": 2\nPONG }`,
`PONG {\nPONG "test": true,\nPONG "test2": true\nPONG }`,
])
t.match(joinedOutput(), '')
})
Expand Down

0 comments on commit 7bc5682

Please sign in to comment.