Debian Codegraph @

smoke-tests/tap-snapshots/test/index.js.test.cjs

raw
1 /* IMPORTANT
2 * This snapshot file is auto-generated, but designed for humans.
3 * It should be checked into source control and tracked carefully.
4 * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
5 * Make sure to inspect the output below. Do not ignore changes!
6 */
7 'use strict'
8 exports[`test/index.js TAP basic npm (no args) > should have expected no args output 1`] = `
9 npm <command>
10
11 Usage:
12
13 npm install install all the dependencies in your project
14 npm install <foo> add the <foo> dependency to your project
15 npm test run this project's tests
16 npm run <foo> run the script named <foo>
17 npm <command> -h quick help on <command>
18 npm -l display usage info for all commands
19 npm help <term> search for help on <term>
20 npm help npm more involved overview
21
22 All commands:
23
24 access, adduser, approve-scripts, audit, bugs, cache, ci,
25 completion, config, dedupe, deny-scripts, deprecate, diff,
26 dist-tag, docs, doctor, edit, exec, explain, explore,
27 find-dupes, fund, get, help, help-search, init, install,
28 install-ci-test, install-test, link, ll, login, logout, ls,
29 org, outdated, owner, pack, ping, pkg, prefix, profile,
30 prune, publish, query, rebuild, repo, restart, root, run,
31 sbom, search, set, shrinkwrap, stage, star, stars, start,
32 stop, team, test, token, trust, undeprecate, uninstall,
33 unpublish, unstar, update, version, view, whoami
34
35 Specify configs in the ini-formatted file:
36 {NPM}/{TESTDIR}/home/.npmrc
37 or on the command line via: npm <command> --key=value
38
39 More configuration info: npm help config
40 Configuration fields: npm help 7 config
41
42 npm {NPM}
43 `
44
45 exports[`test/index.js TAP basic npm ci > should throw mismatch deps in lock file error 1`] = `
46 npm error code EUSAGE
47 npm error
48 npm error \`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.
49 npm error
50 npm error Invalid: lock file's [email protected] does not satisfy [email protected]
51 npm error
52 npm error Clean install a project
53 npm error
54 npm error Usage:
55 npm error npm ci
56 npm error
57 npm error Options:
58 npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
59 npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
60 npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
61 npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts]
62 npm error [--allow-directory <all|none|root>] [--allow-file <all|none|root>]
63 npm error [--allow-git <all|none|root>] [--allow-remote <all|none|root>]
64 npm error [--allow-scripts <package-list> [--allow-scripts <package-list> ...]]
65 npm error [--strict-allow-scripts] [--dangerously-allow-all-scripts] [--no-audit]
66 npm error [--no-bin-links] [--no-fund] [--dry-run]
67 npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
68 npm error [--workspaces] [--include-workspace-root] [--install-links]
69 npm error
70 npm error --install-strategy
71 npm error Sets the strategy for installing packages in node_modules.
72 npm error
73 npm error --legacy-bundling
74 npm error Instead of hoisting package installs in \`node_modules\`, install packages
75 npm error
76 npm error --global-style
77 npm error Only install direct dependencies in the top level \`node_modules\`,
78 npm error
79 npm error --omit
80 npm error Dependency types to omit from the installation tree on disk.
81 npm error
82 npm error --include
83 npm error Option that allows for defining which types of dependencies to install.
84 npm error
85 npm error --strict-peer-deps
86 npm error If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_
87 npm error
88 npm error --foreground-scripts
89 npm error Run all build scripts (ie, \`preinstall\`, \`install\`, and
90 npm error
91 npm error --ignore-scripts
92 npm error If true, npm does not run scripts specified in package.json files.
93 npm error
94 npm error --allow-directory
95 npm error Limits the ability for npm to install dependencies from directories.
96 npm error
97 npm error --allow-file
98 npm error Limits the ability for npm to install dependencies from tarball files.
99 npm error
100 npm error --allow-git
101 npm error Limits the ability for npm to fetch dependencies from git references.
102 npm error
103 npm error --allow-remote
104 npm error Limits the ability for npm to fetch dependencies from urls.
105 npm error
106 npm error --allow-scripts
107 npm error Comma-separated list of packages whose install-time lifecycle scripts
108 npm error
109 npm error --strict-allow-scripts
110 npm error If \`true\`, turn the install-script policy from a warning into a hard
111 npm error
112 npm error --dangerously-allow-all-scripts
113 npm error If \`true\`, bypass the \`allowScripts\` policy entirely and run every
114 npm error
115 npm error --audit
116 npm error When "true" submit audit reports alongside the current npm command to the
117 npm error
118 npm error --bin-links
119 npm error Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package
120 npm error
121 npm error --fund
122 npm error When "true" displays the message at the end of each \`npm install\`
123 npm error
124 npm error --dry-run
125 npm error Indicates that you don't want npm to make any changes and that it should
126 npm error
127 npm error -w|--workspace
128 npm error Enable running a command in the context of the configured workspaces of the
129 npm error
130 npm error --workspaces
131 npm error Set to true to run the command in the context of **all** configured
132 npm error
133 npm error --include-workspace-root
134 npm error Include the workspace root when workspaces are enabled for a command.
135 npm error
136 npm error --install-links
137 npm error When set file: protocol dependencies will be packed and installed as
138 npm error
139 npm error
140 npm error aliases: clean-install, ic, install-clean, isntall-clean
141 npm error
142 npm error Run "npm help ci" for more info
143 npm error A complete log of this run can be found in: {NPM}/{TESTDIR}/cache/_logs/{LOG}
144 `
145
146 exports[`test/index.js TAP basic npm diff > should have expected diff output 1`] = `
147 diff --git a/index.js b/index.js
148 index v1.0.4..v1.1.1 100644
149 --- a/index.js
150 +++ b/index.js
151 @@ -1,1 +1,1 @@
152 -module.exports = "1.0.4"
153 / No newline at end of file
154 +module.exports = "1.1.1"
155 / No newline at end of file
156 diff --git a/package.json b/package.json
157 index v1.0.4..v1.1.1 100644
158 --- a/package.json
159 +++ b/package.json
160 @@ -1,4 +1,4 @@
161 {
162 "name": "abbrev",
163 - "version": "1.0.4"
164 + "version": "1.1.1"
165 }
166 / No newline at end of file
167 `
168
169 exports[`test/index.js TAP basic npm explain > should have expected explain output 1`] = `
170 [email protected]
171 node_modules/abbrev
172 abbrev@"^1.0.4" from the root project
173 `
174
175 exports[`test/index.js TAP basic npm fund > should have expected fund output 1`] = `
176 [email protected]
177 \`-- https://github.com/sponsors
178 \`-- [email protected]
179 `
180
181 exports[`test/index.js TAP basic npm init > should have successful npm init result 1`] = `
182 Wrote to {NPM}/{TESTDIR}/project/package.json:
183
184 {
185 "name": "project",
186 "version": "1.0.0",
187 "description": "",
188 "main": "index.js",
189 "scripts": {
190 "test": "echo /"Error: no test specified/" && exit 1"
191 },
192 "keywords": [],
193 "author": "",
194 "license": "ISC",
195 "type": "commonjs"
196 }
197 `
198
199 exports[`test/index.js TAP basic npm install dev dep > should have expected dev dep added lockfile result 1`] = `
200 Object {
201 "lockfileVersion": 3,
202 "name": "project",
203 "packages": Object {
204 "": Object {
205 "dependencies": Object {
206 "abbrev": "^1.0.4",
207 },
208 "devDependencies": Object {
209 "promise-all-reject-late": "^5.0.0",
210 },
211 "license": "ISC",
212 "name": "project",
213 "version": "1.0.0",
214 },
215 "node_modules/abbrev": Object {
216 "resolved": "{REGISTRY}/abbrev/-/abbrev-1.0.4.tgz",
217 "version": "1.0.4",
218 },
219 "node_modules/promise-all-reject-late": Object {
220 "dev": true,
221 "funding": Object {
222 "url": "https://github.com/sponsors",
223 },
224 "resolved": "{REGISTRY}/promise-all-reject-late/-/promise-all-reject-late-5.0.0.tgz",
225 "version": "5.0.0",
226 },
227 },
228 "requires": true,
229 "version": "1.0.0",
230 }
231 `
232
233 exports[`test/index.js TAP basic npm install dev dep > should have expected dev dep added package.json result 1`] = `
234 Object {
235 "author": "",
236 "dependencies": Object {
237 "abbrev": "^1.0.4",
238 },
239 "description": "",
240 "devDependencies": Object {
241 "promise-all-reject-late": "^5.0.0",
242 },
243 "keywords": Array [],
244 "license": "ISC",
245 "main": "index.js",
246 "name": "project",
247 "scripts": Object {
248 "test": "echo /"Error: no test specified/" && exit 1",
249 },
250 "type": "commonjs",
251 "version": "1.0.0",
252 }
253 `
254
255 exports[`test/index.js TAP basic npm install dev dep > should have expected dev dep added reify output 1`] = `
256 added 1 package in {TIME}
257
258 1 package is looking for funding
259 run \`npm fund\` for details
260 `
261
262 exports[`test/index.js TAP basic npm install prodDep@version > should have expected install reify output 1`] = `
263 added 1 package in {TIME}
264 `
265
266 exports[`test/index.js TAP basic npm install prodDep@version > should have expected lockfile result 1`] = `
267 Object {
268 "lockfileVersion": 3,
269 "name": "project",
270 "packages": Object {
271 "": Object {
272 "dependencies": Object {
273 "abbrev": "^1.0.4",
274 },
275 "license": "ISC",
276 "name": "project",
277 "version": "1.0.0",
278 },
279 "node_modules/abbrev": Object {
280 "resolved": "{REGISTRY}/abbrev/-/abbrev-1.0.4.tgz",
281 "version": "1.0.4",
282 },
283 },
284 "requires": true,
285 "version": "1.0.0",
286 }
287 `
288
289 exports[`test/index.js TAP basic npm install prodDep@version > should have expected package.json result 1`] = `
290 Object {
291 "author": "",
292 "dependencies": Object {
293 "abbrev": "^1.0.4",
294 },
295 "description": "",
296 "keywords": Array [],
297 "license": "ISC",
298 "main": "index.js",
299 "name": "project",
300 "scripts": Object {
301 "test": "echo /"Error: no test specified/" && exit 1",
302 },
303 "type": "commonjs",
304 "version": "1.0.0",
305 }
306 `
307
308 exports[`test/index.js TAP basic npm ls > should have expected ls output 1`] = `
309 [email protected] {NPM}/{TESTDIR}/project
310 +-- [email protected]
311 \`-- [email protected]
312 `
313
314 exports[`test/index.js TAP basic npm outdated > should have expected outdated output 1`] = `
315 Package Current Wanted Latest Location Depended by
316 abbrev 1.0.4 1.1.1 1.1.1 node_modules/abbrev project
317 `
318
319 exports[`test/index.js TAP basic npm pkg > should have expected npm pkg delete modified package.json result 1`] = `
320 Object {
321 "author": "",
322 "dependencies": Object {
323 "abbrev": "^1.0.4",
324 },
325 "description": "",
326 "keywords": Array [],
327 "license": "ISC",
328 "main": "index.js",
329 "name": "project",
330 "scripts": Object {
331 "hello": "echo Hello",
332 "test": "echo /"Error: no test specified/" && exit 1",
333 },
334 "type": "commonjs",
335 "version": "1.0.0",
336 }
337 `
338
339 exports[`test/index.js TAP basic npm pkg > should have expected npm pkg set modified package.json result 1`] = `
340 Object {
341 "author": "",
342 "dependencies": Object {
343 "abbrev": "^1.0.4",
344 },
345 "description": "",
346 "keywords": Array [],
347 "license": "ISC",
348 "main": "index.js",
349 "name": "project",
350 "scripts": Object {
351 "hello": "echo Hello",
352 "test": "echo /"Error: no test specified/" && exit 1",
353 },
354 "tap": Object {
355 "test-env": Array [
356 "LC_ALL=sk",
357 ],
358 },
359 "type": "commonjs",
360 "version": "1.0.0",
361 }
362 `
363
364 exports[`test/index.js TAP basic npm pkg > should have expected pkg delete output 1`] = `
365
366 `
367
368 exports[`test/index.js TAP basic npm pkg > should have expected pkg get output 1`] = `
369 "ISC"
370 `
371
372 exports[`test/index.js TAP basic npm pkg > should have expected pkg set output 1`] = `
373
374 `
375
376 exports[`test/index.js TAP basic npm pkg > should print package.json contents 1`] = `
377 {
378 "name": "project",
379 "version": "1.0.0",
380 "description": "",
381 "main": "index.js",
382 "scripts": {
383 "test": "echo /"Error: no test specified/" && exit 1",
384 "hello": "echo Hello"
385 },
386 "keywords": [],
387 "author": "",
388 "license": "ISC",
389 "type": "commonjs",
390 "dependencies": {
391 "abbrev": "^1.0.4"
392 },
393 "tap": {
394 "test-env": [
395 "LC_ALL=sk"
396 ]
397 }
398 }
399 `
400
401 exports[`test/index.js TAP basic npm pkg set scripts > should have expected script added package.json result 1`] = `
402 Object {
403 "author": "",
404 "dependencies": Object {
405 "abbrev": "^1.0.4",
406 },
407 "description": "",
408 "devDependencies": Object {
409 "promise-all-reject-late": "^5.0.0",
410 },
411 "keywords": Array [],
412 "license": "ISC",
413 "main": "index.js",
414 "name": "project",
415 "scripts": Object {
416 "hello": "echo Hello",
417 "test": "echo /"Error: no test specified/" && exit 1",
418 },
419 "type": "commonjs",
420 "version": "1.0.0",
421 }
422 `
423
424 exports[`test/index.js TAP basic npm pkg set scripts > should have expected set-script output 1`] = `
425
426 `
427
428 exports[`test/index.js TAP basic npm prefix > should have expected prefix output 1`] = `
429 {NPM}/{TESTDIR}/project
430 `
431
432 exports[`test/index.js TAP basic npm run > should have expected run output 1`] = `
433 > [email protected] hello
434 > echo Hello
435
436 Hello
437 `
438
439 exports[`test/index.js TAP basic npm uninstall > should have expected uninstall lockfile result 1`] = `
440 Object {
441 "lockfileVersion": 3,
442 "name": "project",
443 "packages": Object {
444 "": Object {
445 "dependencies": Object {
446 "abbrev": "^1.0.4",
447 },
448 "license": "ISC",
449 "name": "project",
450 "version": "1.0.0",
451 },
452 "node_modules/abbrev": Object {
453 "resolved": "{REGISTRY}/abbrev/-/abbrev-1.1.1.tgz",
454 "version": "1.1.1",
455 },
456 },
457 "requires": true,
458 "version": "1.0.0",
459 }
460 `
461
462 exports[`test/index.js TAP basic npm uninstall > should have expected uninstall package.json result 1`] = `
463 Object {
464 "author": "",
465 "dependencies": Object {
466 "abbrev": "^1.0.4",
467 },
468 "description": "",
469 "keywords": Array [],
470 "license": "ISC",
471 "main": "index.js",
472 "name": "project",
473 "scripts": Object {
474 "hello": "echo Hello",
475 "test": "echo /"Error: no test specified/" && exit 1",
476 },
477 "type": "commonjs",
478 "version": "1.0.0",
479 }
480 `
481
482 exports[`test/index.js TAP basic npm uninstall > should have expected uninstall reify output 1`] = `
483 removed 1 package in {TIME}
484 `
485
486 exports[`test/index.js TAP basic npm update dep > should have expected update lockfile result 1`] = `
487 Object {
488 "lockfileVersion": 3,
489 "name": "project",
490 "packages": Object {
491 "": Object {
492 "dependencies": Object {
493 "abbrev": "^1.0.4",
494 },
495 "devDependencies": Object {
496 "promise-all-reject-late": "^5.0.0",
497 },
498 "license": "ISC",
499 "name": "project",
500 "version": "1.0.0",
501 },
502 "node_modules/abbrev": Object {
503 "resolved": "{REGISTRY}/abbrev/-/abbrev-1.1.1.tgz",
504 "version": "1.1.1",
505 },
506 "node_modules/promise-all-reject-late": Object {
507 "dev": true,
508 "funding": Object {
509 "url": "https://github.com/sponsors",
510 },
511 "resolved": "{REGISTRY}/promise-all-reject-late/-/promise-all-reject-late-5.0.0.tgz",
512 "version": "5.0.0",
513 },
514 },
515 "requires": true,
516 "version": "1.0.0",
517 }
518 `
519
520 exports[`test/index.js TAP basic npm update dep > should have expected update package.json result 1`] = `
521 Object {
522 "author": "",
523 "dependencies": Object {
524 "abbrev": "^1.0.4",
525 },
526 "description": "",
527 "devDependencies": Object {
528 "promise-all-reject-late": "^5.0.0",
529 },
530 "keywords": Array [],
531 "license": "ISC",
532 "main": "index.js",
533 "name": "project",
534 "scripts": Object {
535 "hello": "echo Hello",
536 "test": "echo /"Error: no test specified/" && exit 1",
537 },
538 "type": "commonjs",
539 "version": "1.0.0",
540 }
541 `
542
543 exports[`test/index.js TAP basic npm update dep > should have expected update reify output 1`] = `
544 changed 1 package in {TIME}
545
546 1 package is looking for funding
547 run \`npm fund\` for details
548 `
549
550 exports[`test/index.js TAP basic npm view > should have expected view output 1`] = `
551 [email protected] | Proprietary | deps: none | versions: 2
552 mocked test package
553
554 dist
555 .tarball: {REGISTRY}/abbrev/-/abbrev-1.0.4.tgz
556 .shasum: undefined
557
558 dist-tags:
559 latest: 1.1.1
560
561 published just now
562 `