diff options
author | Gar <gar+gh@danger.computer> | 2022-05-19 01:34:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-19 01:34:49 +0300 |
commit | 400c80f570228a2c0ffe09d6564cc88dc2f356c3 (patch) | |
tree | 54d392eb90a52cd418f2db17508dbeab8b981a53 /tap-snapshots/test | |
parent | 8898710220a3d84b0a9ea2a6d9cf880e50b94c9e (diff) |
fix(ci): remove node_modules post-validation (#4913)
The removal of node_modules was happening in a race with the loading of
the virtualTree, and before the validation of the package-lock against
the package.json. This defers the removal till after all that
validation has happened.
It also makes the errors thrown usage errors, and refactors the tests to
be real.
Diffstat (limited to 'tap-snapshots/test')
-rw-r--r-- | tap-snapshots/test/lib/commands/ci.js.test.cjs | 13 | ||||
-rw-r--r-- | tap-snapshots/test/lib/load-all-commands.js.test.cjs | 2 | ||||
-rw-r--r-- | tap-snapshots/test/lib/utils/npm-usage.js.test.cjs | 2 |
3 files changed, 2 insertions, 15 deletions
diff --git a/tap-snapshots/test/lib/commands/ci.js.test.cjs b/tap-snapshots/test/lib/commands/ci.js.test.cjs deleted file mode 100644 index d6a747177..000000000 --- a/tap-snapshots/test/lib/commands/ci.js.test.cjs +++ /dev/null @@ -1,13 +0,0 @@ -/* 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/commands/ci.js TAP should throw error when ideal inventory mismatches virtual > must match snapshot 1`] = ` -\`npm ci\` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with \`npm install\` before continuing. - -Invalid: lock file's foo@1.0.0 does not satisfy foo@2.0.0 - -` diff --git a/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/tap-snapshots/test/lib/load-all-commands.js.test.cjs index 2029289d1..b8c274b08 100644 --- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs +++ b/tap-snapshots/test/lib/load-all-commands.js.test.cjs @@ -113,7 +113,7 @@ Run "npm help cache" for more info ` exports[`test/lib/load-all-commands.js TAP load each command ci > must match snapshot 1`] = ` -Install a project with a clean slate +Clean install a project Usage: npm ci diff --git a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs index 22fad5c77..e7660911f 100644 --- a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs +++ b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs @@ -251,7 +251,7 @@ All commands: Run "npm help cache" for more info - ci Install a project with a clean slate + ci Clean install a project Usage: npm ci |