From d44393929a3a3ce82f18a60e1cc9bb23c970fe19 Mon Sep 17 00:00:00 2001 From: nlf Date: Tue, 2 Feb 2021 11:48:27 -0800 Subject: chore: utils cleanup and tests - remove spawn util, refactor help command - add tests for read-user-info, minor refactor - add tests for pulse-till-done util, refactor - add tests for otplease util - add tests for open-url util - remove unused no-progress-while-running util PR-URL: https://github.com/npm/cli/pull/2601 Credit: @nlf Close: #2601 Reviewed-by: @ruyadorno, @wraithgar --- .../test-lib-utils-open-url.js-TAP.test.js | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tap-snapshots/test-lib-utils-open-url.js-TAP.test.js (limited to 'tap-snapshots') diff --git a/tap-snapshots/test-lib-utils-open-url.js-TAP.test.js b/tap-snapshots/test-lib-utils-open-url.js-TAP.test.js new file mode 100644 index 000000000..8c8159ebc --- /dev/null +++ b/tap-snapshots/test-lib-utils-open-url.js-TAP.test.js @@ -0,0 +1,25 @@ +/* IMPORTANT + * This snapshot file is auto-generated, but designed for humans. + * It should be checked into source control and tracked carefully. + * Re-generate by setting TAP_SNAPSHOT=1 and running tests. + * Make sure to inspect the output below. Do not ignore changes! + */ +'use strict' +exports[`test/lib/utils/open-url.js TAP prints where to go when browser is disabled > printed expected message 1`] = ` +npm home: + https://www.npmjs.com + +` + +exports[`test/lib/utils/open-url.js TAP prints where to go when browser is disabled and json is enabled > printed expected message 1`] = ` +{ + "title": "npm home", + "url": "https://www.npmjs.com" +} +` + +exports[`test/lib/utils/open-url.js TAP prints where to go when given browser does not exist > printed expected message 1`] = ` +npm home: + https://www.npmjs.com + +` -- cgit v1.2.3