-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added tests for new npx functionality
- Loading branch information
1 parent
32ba17f
commit ed9cd93
Showing
3 changed files
with
490 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,82 @@ make-fetch-happen:request-cache:https://registry.npmjs.org/foo | |
make-fetch-happen:request-cache:https://registry.npmjs.org/foo/-/foo-1.2.3-beta.tgz | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx info: valid and invalid entry > shows invalid package info 1`] = ` | ||
invalid npx cache entry with key deadbeef | ||
location: /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-info-valid-and-invalid-entry/cache/_npx/deadbeef | ||
invalid npx cache entry with key badc0de | ||
location: /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-info-valid-and-invalid-entry/cache/_npx/badc0de | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx info: valid and invalid entry > shows valid package info 1`] = ` | ||
invalid npx cache entry with key deadbeef | ||
location: /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-info-valid-and-invalid-entry/cache/_npx/deadbeef | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with _npx directory package > shows valid package info with _npx directory package 1`] = ` | ||
valid npx cache entry with key valid123 | ||
location: /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-info-valid-entry-with-_npx-directory-package/cache/_npx/valid123 | ||
packages: | ||
- /path/to/valid-package | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with _npx packages > shows valid package info with _npx packages 1`] = ` | ||
valid npx cache entry with key valid123 | ||
location: /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-info-valid-entry-with-_npx-packages/cache/_npx/valid123 | ||
packages: | ||
- [email protected] ([email protected]) | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with a link dependency > shows link dependency realpath (child.isLink branch) 1`] = ` | ||
valid npx cache entry with key link123 | ||
location: /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-info-valid-entry-with-a-link-dependency/cache/_npx/link123 | ||
packages: (unknown) | ||
dependencies: | ||
- /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-info-valid-entry-with-a-link-dependency/cache/_npx/some-other-loc | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with dependencies > shows valid package info with dependencies 1`] = ` | ||
valid npx cache entry with key valid456 | ||
location: /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-info-valid-entry-with-dependencies/cache/_npx/valid456 | ||
packages: (unknown) | ||
dependencies: | ||
- [email protected] | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx ls: empty cache > logs message for empty npx cache 1`] = ` | ||
npx cache does not exist | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx ls: entry with unknown package > lists entry with unknown package 1`] = ` | ||
unknown123: (unknown) | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx ls: some entries > lists one valid and one invalid entry 1`] = ` | ||
abc123: [email protected] | ||
z9y8x7: (empty/invalid) | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx rm: remove single entry > logs removing single npx cache entry 1`] = ` | ||
Removing npx key at /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-rm-remove-single-entry/cache/_npx/123removeme | ||
Removing npx key at /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-rm-remove-single-entry/cache/_npx/123removeme | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx rm: removing all with --force works > logs removing everything 1`] = ` | ||
Removing npx key at /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-rm-removing-all-with---force-works/cache/_npx/remove-all-yes-force | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx rm: removing all without --force fails > logs usage error when removing all without --force 1`] = ` | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache npx rm: removing more than 1, less than all entries > logs removing 2 of 3 entries 1`] = ` | ||
Removing npx key at /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-rm-removing-more-than-1-less-than-all-entries/cache/_npx/123removeme | ||
Removing npx key at /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-rm-removing-more-than-1-less-than-all-entries/cache/_npx/456removeme | ||
Removing npx key at /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-rm-removing-more-than-1-less-than-all-entries/cache/_npx/123removeme | ||
Removing npx key at /Users/owlstronaut/Documents/npmjs/cli/test/lib/commands/tap-testdir-cache-cache-npx-rm-removing-more-than-1-less-than-all-entries/cache/_npx/456removeme | ||
` | ||
|
||
exports[`test/lib/commands/cache.js TAP cache rm > logs deleting single entry 1`] = ` | ||
Deleted: make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz | ||
` | ||
|
Oops, something went wrong.