From 7bc5682e2657e1f9caa2cf11b50dd8cf35508550 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Thu, 11 Apr 2024 10:58:52 -0700 Subject: [PATCH] Remove ping debugging code --- lib/commands/ping.js | 3 +-- test/lib/commands/ping.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/commands/ping.js b/lib/commands/ping.js index ae9b1f957e705..2015e6e13ccb1 100644 --- a/lib/commands/ping.js +++ b/lib/commands/ping.js @@ -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')) { diff --git a/test/lib/commands/ping.js b/test/lib/commands/ping.js index 87eed42ac068e..7f90ea394f9ae 100644 --- a/test/lib/commands/ping.js +++ b/test/lib/commands/ping.js @@ -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(), '') })