Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclaudiahdz <cghr1990@gmail.com>2020-08-28 00:42:21 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2020-09-16 18:16:37 +0300
commit3743a42c854d9ea7e333d7ff86d206a4b079a352 (patch)
tree7c0e03d367101692f4fa70c092428ef999ef0642 /tap-snapshots
parent63005f4a98d55786fda46f3bbb3feab044d078df (diff)
test: add outdated tests
PR-URL: https://github.com/npm/cli/pull/1750 Credit: @claudiahdz Close: #1750 Reviewed-by: @ruyadorno
Diffstat (limited to 'tap-snapshots')
-rw-r--r--tap-snapshots/test-lib-outdated.js-TAP.test.js129
1 files changed, 129 insertions, 0 deletions
diff --git a/tap-snapshots/test-lib-outdated.js-TAP.test.js b/tap-snapshots/test-lib-outdated.js-TAP.test.js
new file mode 100644
index 000000000..e2f580b96
--- /dev/null
+++ b/tap-snapshots/test-lib-outdated.js-TAP.test.js
@@ -0,0 +1,129 @@
+/* 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/outdated.js TAP should display outdated deps outdated --all > must match snapshot 1`] = `
+
+Package Current Wanted Latest Location Depended by
+alpha 1.0.0 1.0.1 1.0.1 node_modules/alpha outdated-should-display-outdated-deps
+beta 1.0.0 1.0.1 1.0.1 node_modules/beta outdated-should-display-outdated-deps
+gamma 1.0.1 1.0.1 2.0.0 node_modules/gamma outdated-should-display-outdated-deps
+theta MISSING 1.0.1 1.0.1 - outdated-should-display-outdated-deps
+`
+
+exports[`test/lib/outdated.js TAP should display outdated deps outdated --json --long > must match snapshot 1`] = `
+
+{
+ "alpha": {
+ "current": "1.0.0",
+ "wanted": "1.0.1",
+ "latest": "1.0.1",
+ "dependent": "outdated-should-display-outdated-deps",
+ "location": "{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/alpha",
+ "type": "dependencies"
+ },
+ "beta": {
+ "current": "1.0.0",
+ "wanted": "1.0.1",
+ "latest": "1.0.1",
+ "dependent": "outdated-should-display-outdated-deps",
+ "location": "{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/beta",
+ "type": "peerDependencies"
+ },
+ "gamma": {
+ "current": "1.0.1",
+ "wanted": "1.0.1",
+ "latest": "2.0.0",
+ "dependent": "outdated-should-display-outdated-deps",
+ "location": "{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/gamma",
+ "type": "dependencies"
+ },
+ "theta": {
+ "wanted": "1.0.1",
+ "latest": "1.0.1",
+ "dependent": "outdated-should-display-outdated-deps",
+ "type": "dependencies"
+ }
+}
+`
+
+exports[`test/lib/outdated.js TAP should display outdated deps outdated --json > must match snapshot 1`] = `
+
+{
+ "alpha": {
+ "current": "1.0.0",
+ "wanted": "1.0.1",
+ "latest": "1.0.1",
+ "dependent": "outdated-should-display-outdated-deps",
+ "location": "{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/alpha"
+ },
+ "beta": {
+ "current": "1.0.0",
+ "wanted": "1.0.1",
+ "latest": "1.0.1",
+ "dependent": "outdated-should-display-outdated-deps",
+ "location": "{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/beta"
+ },
+ "gamma": {
+ "current": "1.0.1",
+ "wanted": "1.0.1",
+ "latest": "2.0.0",
+ "dependent": "outdated-should-display-outdated-deps",
+ "location": "{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/gamma"
+ },
+ "theta": {
+ "wanted": "1.0.1",
+ "latest": "1.0.1",
+ "dependent": "outdated-should-display-outdated-deps"
+ }
+}
+`
+
+exports[`test/lib/outdated.js TAP should display outdated deps outdated --long > must match snapshot 1`] = `
+
+Package Current Wanted Latest Location Depended by Package Type Homepage
+alpha 1.0.0 1.0.1 1.0.1 node_modules/alpha outdated-should-display-outdated-deps dependencies
+beta 1.0.0 1.0.1 1.0.1 node_modules/beta outdated-should-display-outdated-deps peerDependencies
+gamma 1.0.1 1.0.1 2.0.0 node_modules/gamma outdated-should-display-outdated-deps dependencies
+theta MISSING 1.0.1 1.0.1 - outdated-should-display-outdated-deps dependencies
+`
+
+exports[`test/lib/outdated.js TAP should display outdated deps outdated --parseable --long > must match snapshot 1`] = `
+
+{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/alpha:alpha@1.0.1:alpha@1.0.0:alpha@1.0.1:outdated-should-display-outdated-deps:dependencies:
+{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/beta:beta@1.0.1:beta@1.0.0:beta@1.0.1:outdated-should-display-outdated-deps:peerDependencies:
+{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/gamma:gamma@1.0.1:gamma@1.0.1:gamma@2.0.0:outdated-should-display-outdated-deps:dependencies:
+:theta@1.0.1:MISSING:theta@1.0.1:outdated-should-display-outdated-deps:dependencies:
+`
+
+exports[`test/lib/outdated.js TAP should display outdated deps outdated --parseable > must match snapshot 1`] = `
+
+{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/alpha:alpha@1.0.1:alpha@1.0.0:alpha@1.0.1:outdated-should-display-outdated-deps
+{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/beta:beta@1.0.1:beta@1.0.0:beta@1.0.1:outdated-should-display-outdated-deps
+{CWD}/test/lib/outdated-should-display-outdated-deps/node_modules/gamma:gamma@1.0.1:gamma@1.0.1:gamma@2.0.0:outdated-should-display-outdated-deps
+:theta@1.0.1:MISSING:theta@1.0.1:outdated-should-display-outdated-deps
+`
+
+exports[`test/lib/outdated.js TAP should display outdated deps outdated > must match snapshot 1`] = `
+
+Package Current Wanted Latest Location Depended by
+alpha 1.0.0 1.0.1 1.0.1 node_modules/alpha outdated-should-display-outdated-deps
+beta 1.0.0 1.0.1 1.0.1 node_modules/beta outdated-should-display-outdated-deps
+gamma 1.0.1 1.0.1 2.0.0 node_modules/gamma outdated-should-display-outdated-deps
+theta MISSING 1.0.1 1.0.1 - outdated-should-display-outdated-deps
+`
+
+exports[`test/lib/outdated.js TAP should display outdated deps outdated global > must match snapshot 1`] = `
+
+Package Current Wanted Latest Location Depended by
+alpha 1.0.0 1.0.1 1.0.1 node_modules/alpha global
+`
+
+exports[`test/lib/outdated.js TAP should display outdated deps outdated specific dep > must match snapshot 1`] = `
+
+Package Current Wanted Latest Location Depended by
+alpha 1.0.0 1.0.1 1.0.1 node_modules/alpha outdated-should-display-outdated-deps
+`