From ac4f9e4c55f9f97d99e2a11f0ef5dd9b900b0ef0 Mon Sep 17 00:00:00 2001 From: Gar Date: Mon, 8 Nov 2021 10:54:44 -0800 Subject: [PATCH] chore: clean up snapshots Looks like tests were removed but the snapshots still have them. PR-URL: https://github.com/npm/cli/pull/4019 Credit: @wraithgar Close: #4019 Reviewed-by: @lukekarrys --- .../test/lib/commands/dist-tag.js.test.cjs | 136 ------------------ .../test/lib/commands/publish.js.test.cjs | 19 --- 2 files changed, 155 deletions(-) diff --git a/tap-snapshots/test/lib/commands/dist-tag.js.test.cjs b/tap-snapshots/test/lib/commands/dist-tag.js.test.cjs index 53f296ac02bde..73cc223a9a0b9 100644 --- a/tap-snapshots/test/lib/commands/dist-tag.js.test.cjs +++ b/tap-snapshots/test/lib/commands/dist-tag.js.test.cjs @@ -5,50 +5,6 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' -exports[`test/lib/commands/dist-tag.js TAP add missing args > should exit usage error message 1`] = ` -Error: -Usage: npm dist-tag - -Modify package distribution tags - -Usage: -npm dist-tag add @ [] -npm dist-tag rm -npm dist-tag ls [] - -Options: -[-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] - -alias: dist-tags - -Run "npm help dist-tag" for more info { - "code": "EUSAGE", -} -` - -exports[`test/lib/commands/dist-tag.js TAP add missing pkg name > should exit usage error message 1`] = ` -Error: -Usage: npm dist-tag - -Modify package distribution tags - -Usage: -npm dist-tag add @ [] -npm dist-tag rm -npm dist-tag ls [] - -Options: -[-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] - -alias: dist-tags - -Run "npm help dist-tag" for more info { - "code": "EUSAGE", -} -` - exports[`test/lib/commands/dist-tag.js TAP add new tag > should return success msg 1`] = ` +c: @scoped/another@7.7.7 ` @@ -58,87 +14,17 @@ dist-tag add 1.0.0 to @scoped/another@7.7.7 ` -exports[`test/lib/commands/dist-tag.js TAP borked cmd usage > should show usage error 1`] = ` -Error: -Usage: npm dist-tag - -Modify package distribution tags - -Usage: -npm dist-tag add @ [] -npm dist-tag rm -npm dist-tag ls [] - -Options: -[-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] - -alias: dist-tags - -Run "npm help dist-tag" for more info { - "code": "EUSAGE", -} -` - -exports[`test/lib/commands/dist-tag.js TAP ls global > should throw basic usage 1`] = ` -Error: -Usage: npm dist-tag - -Modify package distribution tags - -Usage: -npm dist-tag add @ [] -npm dist-tag rm -npm dist-tag ls [] - -Options: -[-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] - -alias: dist-tags - -Run "npm help dist-tag" for more info { - "code": "EUSAGE", -} -` - exports[`test/lib/commands/dist-tag.js TAP ls in current package > should list available tags for current package 1`] = ` a: 0.0.1 b: 0.5.0 latest: 1.0.0 ` -exports[`test/lib/commands/dist-tag.js TAP ls on missing name in current package > should throw usage error message 1`] = ` -Error: -Usage: npm dist-tag - -Modify package distribution tags - -Usage: -npm dist-tag add @ [] -npm dist-tag rm -npm dist-tag ls [] - -Options: -[-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] - -alias: dist-tags - -Run "npm help dist-tag" for more info { - "code": "EUSAGE", -} -` - exports[`test/lib/commands/dist-tag.js TAP ls on missing package > should log no dist-tag found msg 1`] = ` dist-tag ls Couldn't get dist-tag data for foo@latest ` -exports[`test/lib/commands/dist-tag.js TAP ls on missing package > should throw error message 1`] = ` -Error: No dist-tags found for foo -` - exports[`test/lib/commands/dist-tag.js TAP ls on named package > should list tags for the specified package 1`] = ` a: 0.0.2 b: 0.6.0 @@ -166,28 +52,6 @@ exports[`test/lib/commands/dist-tag.js TAP remove existing tag > should return s -c: @scoped/another@7.7.7 ` -exports[`test/lib/commands/dist-tag.js TAP remove missing pkg name > should exit usage error message 1`] = ` -Error: -Usage: npm dist-tag - -Modify package distribution tags - -Usage: -npm dist-tag add @ [] -npm dist-tag rm -npm dist-tag ls [] - -Options: -[-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] - -alias: dist-tags - -Run "npm help dist-tag" for more info { - "code": "EUSAGE", -} -` - exports[`test/lib/commands/dist-tag.js TAP remove non-existing tag > should log error msg 1`] = ` dist-tag del nonexistent from @scoped/another dist-tag del nonexistent is not a dist-tag on @scoped/another diff --git a/tap-snapshots/test/lib/commands/publish.js.test.cjs b/tap-snapshots/test/lib/commands/publish.js.test.cjs index 0d0fa366b398c..dec7727834fa6 100644 --- a/tap-snapshots/test/lib/commands/publish.js.test.cjs +++ b/tap-snapshots/test/lib/commands/publish.js.test.cjs @@ -39,25 +39,6 @@ Array [ ] ` -exports[`test/lib/commands/publish.js TAP shows usage with wrong set of arguments > should print usage 1`] = ` -Error: -Usage: npm publish - -Publish a package - -Usage: -npm publish [] - -Options: -[--tag ] [--access ] [--dry-run] [--otp ] -[-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] - -Run "npm help publish" for more info { - "code": "EUSAGE", -} -` - exports[`test/lib/commands/publish.js TAP workspaces all workspaces > should output all publishes 1`] = ` Array [ "+ workspace-a@1.2.3-a",