Debian Codegraph @

tap-snapshots/test/lib/commands/doctor.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/lib/commands/doctor.js TAP all clear > logs 1`] = `
9 Object {
10 "error": Array [],
11 "info": Array [
12 "doctor Running checkup",
13 "doctor Pinging registry",
14 "doctor Getting npm package information",
15 "doctor Getting Node.js release information",
16 "doctor Finding git in your PATH",
17 "doctor getBinPath Finding npm global bin in your PATH",
18 "doctor verifyCachedFiles Verifying the npm cache",
19 String(
20 doctor verifyCachedFiles Verification complete. Stats: {
21 doctor "badContentCount": 0,
22 doctor "reclaimedCount": 0,
23 doctor "missingContent": 0,
24 doctor "verifiedContent": 0
25 doctor }
26 ),
27 ],
28 "warn": Array [],
29 }
30 `
31
32 exports[`test/lib/commands/doctor.js TAP all clear > output 1`] = `
33 Connecting to the registry
34 Ok
35 Checking npm version
36 Ok
37 current: v1.0.0, latest: v1.0.0
38 Checking node version
39 Ok
40 current: v1.0.0, recommended: v1.0.0
41 Checking configured npm registry
42 Ok
43 using default registry (https://registry.npmjs.org/)
44 Checking for git executable in PATH
45 Ok
46 /path/to/git
47 Checking for global bin folder in PATH
48 Ok
49 {CWD}/global/bin
50 Checking permissions on cached files (this may take awhile)
51 Ok
52 Checking permissions on local node_modules (this may take awhile)
53 Ok
54 Checking permissions on global node_modules (this may take awhile)
55 Ok
56 Checking permissions on local bin folder
57 Ok
58 Checking permissions on global bin folder
59 Ok
60 Verifying cache contents (this may take awhile)
61 Ok
62 verified 0 tarballs
63 `
64
65 exports[`test/lib/commands/doctor.js TAP all clear in color > everything is ok in color 1`] = `
66 Connecting to the registry
67 Ok
68 Checking npm version
69 Ok
70 current: v1.0.0, latest: v1.0.0
71 Checking node version
72 Ok
73 current: v1.0.0, recommended: v1.0.0
74 Checking configured npm registry
75 Ok
76 using default registry (https://registry.npmjs.org/)
77 Checking for git executable in PATH
78 Ok
79 /path/to/git
80 Checking for global bin folder in PATH
81 Ok
82 {CWD}/global/bin
83 Checking permissions on cached files (this may take awhile)
84 Ok
85 Checking permissions on local node_modules (this may take awhile)
86 Ok
87 Checking permissions on global node_modules (this may take awhile)
88 Ok
89 Checking permissions on local bin folder
90 Ok
91 Checking permissions on global bin folder
92 Ok
93 Verifying cache contents (this may take awhile)
94 Ok
95 verified 0 tarballs
96 `
97
98 exports[`test/lib/commands/doctor.js TAP all clear in color > logs 1`] = `
99 Object {
100 "error": Array [],
101 "info": Array [
102 "/u001b[94mdoctor/u001b[39m Running checkup",
103 "/u001b[94mdoctor/u001b[39m Pinging registry",
104 "/u001b[94mdoctor/u001b[39m Getting npm package information",
105 "/u001b[94mdoctor/u001b[39m Getting Node.js release information",
106 "/u001b[94mdoctor/u001b[39m Finding git in your PATH",
107 "/u001b[94mdoctor/u001b[39m getBinPath Finding npm global bin in your PATH",
108 "/u001b[94mdoctor/u001b[39m verifyCachedFiles Verifying the npm cache",
109 String(
110 /u001b[94mdoctor/u001b[39m verifyCachedFiles Verification complete. Stats: {
111 /u001b[94mdoctor/u001b[39m "badContentCount": 0,
112 /u001b[94mdoctor/u001b[39m "reclaimedCount": 0,
113 /u001b[94mdoctor/u001b[39m "missingContent": 0,
114 /u001b[94mdoctor/u001b[39m "verifiedContent": 0
115 /u001b[94mdoctor/u001b[39m }
116 ),
117 ],
118 "warn": Array [],
119 }
120 `
121
122 exports[`test/lib/commands/doctor.js TAP bad proxy > logs 1`] = `
123 Object {
124 "error": Array [
125 "Some problems found. See above for recommendations.",
126 ],
127 "info": Array [
128 "doctor Running checkup",
129 "doctor Pinging registry",
130 "doctor Getting npm package information",
131 "doctor Getting Node.js release information",
132 "doctor Finding git in your PATH",
133 "doctor getBinPath Finding npm global bin in your PATH",
134 "doctor verifyCachedFiles Verifying the npm cache",
135 String(
136 doctor verifyCachedFiles Verification complete. Stats: {
137 doctor "badContentCount": 0,
138 doctor "reclaimedCount": 0,
139 doctor "missingContent": 0,
140 doctor "verifiedContent": 0
141 doctor }
142 ),
143 ],
144 "warn": Array [],
145 }
146 `
147
148 exports[`test/lib/commands/doctor.js TAP bad proxy > output 1`] = `
149 Connecting to the registry
150 Not ok
151 Invalid protocol \`ssh:\` connecting to proxy \`npmjs.org\`
152 Checking npm version
153 Not ok
154 Error: Invalid protocol \`ssh:\` connecting to proxy \`npmjs.org\`
155 Checking node version
156 Not ok
157 Error: Invalid protocol \`ssh:\` connecting to proxy \`npmjs.org\`
158 Checking configured npm registry
159 Ok
160 using default registry (https://registry.npmjs.org/)
161 Checking for git executable in PATH
162 Ok
163 /path/to/git
164 Checking for global bin folder in PATH
165 Ok
166 {CWD}/global/bin
167 Checking permissions on cached files (this may take awhile)
168 Ok
169 Checking permissions on local node_modules (this may take awhile)
170 Ok
171 Checking permissions on global node_modules (this may take awhile)
172 Ok
173 Checking permissions on local bin folder
174 Ok
175 Checking permissions on global bin folder
176 Ok
177 Verifying cache contents (this may take awhile)
178 Ok
179 verified 0 tarballs
180 `
181
182 exports[`test/lib/commands/doctor.js TAP cacache badContent > corrupted cache content 1`] = `
183 Connecting to the registry
184 Ok
185 Checking npm version
186 Ok
187 current: v1.0.0, latest: v1.0.0
188 Checking node version
189 Ok
190 current: v1.0.0, recommended: v1.0.0
191 Checking configured npm registry
192 Ok
193 using default registry (https://registry.npmjs.org/)
194 Checking for git executable in PATH
195 Ok
196 /path/to/git
197 Checking for global bin folder in PATH
198 Ok
199 {CWD}/global/bin
200 Checking permissions on cached files (this may take awhile)
201 Ok
202 Checking permissions on local node_modules (this may take awhile)
203 Ok
204 Checking permissions on global node_modules (this may take awhile)
205 Ok
206 Checking permissions on local bin folder
207 Ok
208 Checking permissions on global bin folder
209 Ok
210 Verifying cache contents (this may take awhile)
211 Ok
212 verified 2 tarballs
213 `
214
215 exports[`test/lib/commands/doctor.js TAP cacache badContent > logs 1`] = `
216 Object {
217 "error": Array [],
218 "info": Array [
219 "doctor Running checkup",
220 "doctor Pinging registry",
221 "doctor Getting npm package information",
222 "doctor Getting Node.js release information",
223 "doctor Finding git in your PATH",
224 "doctor getBinPath Finding npm global bin in your PATH",
225 "doctor verifyCachedFiles Verifying the npm cache",
226 String(
227 doctor verifyCachedFiles Verification complete. Stats: {
228 doctor "badContentCount": 1,
229 doctor "reclaimedCount": 0,
230 doctor "missingContent": 0,
231 doctor "verifiedContent": 2
232 doctor }
233 ),
234 ],
235 "warn": Array [
236 "doctor verifyCachedFiles Corrupted content removed: 1",
237 "doctor verifyCachedFiles Cache issues have been fixed",
238 ],
239 }
240 `
241
242 exports[`test/lib/commands/doctor.js TAP cacache missingContent > logs 1`] = `
243 Object {
244 "error": Array [],
245 "info": Array [
246 "doctor Running checkup",
247 "doctor Pinging registry",
248 "doctor Getting npm package information",
249 "doctor Getting Node.js release information",
250 "doctor Finding git in your PATH",
251 "doctor getBinPath Finding npm global bin in your PATH",
252 "doctor verifyCachedFiles Verifying the npm cache",
253 String(
254 doctor verifyCachedFiles Verification complete. Stats: {
255 doctor "badContentCount": 0,
256 doctor "reclaimedCount": 0,
257 doctor "missingContent": 1,
258 doctor "verifiedContent": 2
259 doctor }
260 ),
261 ],
262 "warn": Array [
263 "doctor verifyCachedFiles Missing content: 1",
264 "doctor verifyCachedFiles Cache issues have been fixed",
265 ],
266 }
267 `
268
269 exports[`test/lib/commands/doctor.js TAP cacache missingContent > missing content 1`] = `
270 Connecting to the registry
271 Ok
272 Checking npm version
273 Ok
274 current: v1.0.0, latest: v1.0.0
275 Checking node version
276 Ok
277 current: v1.0.0, recommended: v1.0.0
278 Checking configured npm registry
279 Ok
280 using default registry (https://registry.npmjs.org/)
281 Checking for git executable in PATH
282 Ok
283 /path/to/git
284 Checking for global bin folder in PATH
285 Ok
286 {CWD}/global/bin
287 Checking permissions on cached files (this may take awhile)
288 Ok
289 Checking permissions on local node_modules (this may take awhile)
290 Ok
291 Checking permissions on global node_modules (this may take awhile)
292 Ok
293 Checking permissions on local bin folder
294 Ok
295 Checking permissions on global bin folder
296 Ok
297 Verifying cache contents (this may take awhile)
298 Ok
299 verified 2 tarballs
300 `
301
302 exports[`test/lib/commands/doctor.js TAP cacache reclaimedCount > content garbage collected 1`] = `
303 Connecting to the registry
304 Ok
305 Checking npm version
306 Ok
307 current: v1.0.0, latest: v1.0.0
308 Checking node version
309 Ok
310 current: v1.0.0, recommended: v1.0.0
311 Checking configured npm registry
312 Ok
313 using default registry (https://registry.npmjs.org/)
314 Checking for git executable in PATH
315 Ok
316 /path/to/git
317 Checking for global bin folder in PATH
318 Ok
319 {CWD}/global/bin
320 Checking permissions on cached files (this may take awhile)
321 Ok
322 Checking permissions on local node_modules (this may take awhile)
323 Ok
324 Checking permissions on global node_modules (this may take awhile)
325 Ok
326 Checking permissions on local bin folder
327 Ok
328 Checking permissions on global bin folder
329 Ok
330 Verifying cache contents (this may take awhile)
331 Ok
332 verified 2 tarballs
333 `
334
335 exports[`test/lib/commands/doctor.js TAP cacache reclaimedCount > logs 1`] = `
336 Object {
337 "error": Array [],
338 "info": Array [
339 "doctor Running checkup",
340 "doctor Pinging registry",
341 "doctor Getting npm package information",
342 "doctor Getting Node.js release information",
343 "doctor Finding git in your PATH",
344 "doctor getBinPath Finding npm global bin in your PATH",
345 "doctor verifyCachedFiles Verifying the npm cache",
346 String(
347 doctor verifyCachedFiles Verification complete. Stats: {
348 doctor "badContentCount": 0,
349 doctor "reclaimedCount": 1,
350 doctor "missingContent": 0,
351 doctor "verifiedContent": 2
352 doctor }
353 ),
354 ],
355 "warn": Array [
356 "doctor verifyCachedFiles Content garbage-collected: 1 (undefined bytes)",
357 "doctor verifyCachedFiles Cache issues have been fixed",
358 ],
359 }
360 `
361
362 exports[`test/lib/commands/doctor.js TAP discrete checks cache > logs 1`] = `
363 Object {
364 "error": Array [],
365 "info": Array [
366 "doctor Running checkup",
367 "doctor verifyCachedFiles Verifying the npm cache",
368 String(
369 doctor verifyCachedFiles Verification complete. Stats: {
370 doctor "badContentCount": 0,
371 doctor "reclaimedCount": 0,
372 doctor "missingContent": 0,
373 doctor "verifiedContent": 0
374 doctor }
375 ),
376 ],
377 "warn": Array [],
378 }
379 `
380
381 exports[`test/lib/commands/doctor.js TAP discrete checks cache > output 1`] = `
382 Checking permissions on cached files (this may take awhile)
383 Ok
384 Verifying cache contents (this may take awhile)
385 Ok
386 verified 0 tarballs
387 `
388
389 exports[`test/lib/commands/doctor.js TAP discrete checks git > logs 1`] = `
390 Object {
391 "error": Array [],
392 "info": Array [
393 "doctor Running checkup",
394 ],
395 "warn": Array [],
396 }
397 `
398
399 exports[`test/lib/commands/doctor.js TAP discrete checks git > output 1`] = `
400
401 `
402
403 exports[`test/lib/commands/doctor.js TAP discrete checks invalid environment > logs 1`] = `
404 Object {
405 "error": Array [
406 "Some problems found. See above for recommendations.",
407 ],
408 "info": Array [
409 "doctor Running checkup",
410 "doctor Finding git in your PATH",
411 "doctor getBinPath Finding npm global bin in your PATH",
412 ],
413 "warn": Array [],
414 }
415 `
416
417 exports[`test/lib/commands/doctor.js TAP discrete checks invalid environment > output 1`] = `
418 Checking for git executable in PATH
419 Ok
420 /path/to/git
421 Checking for global bin folder in PATH
422 Not ok
423 Error: Add {CWD}/global/bin to your $PATH
424 `
425
426 exports[`test/lib/commands/doctor.js TAP discrete checks permissions - not windows > logs 1`] = `
427 Object {
428 "error": Array [],
429 "info": Array [
430 "doctor Running checkup",
431 ],
432 "warn": Array [],
433 }
434 `
435
436 exports[`test/lib/commands/doctor.js TAP discrete checks permissions - not windows > output 1`] = `
437 Checking permissions on cached files (this may take awhile)
438 Ok
439 Checking permissions on local node_modules (this may take awhile)
440 Ok
441 Checking permissions on global node_modules (this may take awhile)
442 Ok
443 Checking permissions on local bin folder
444 Ok
445 Checking permissions on global bin folder
446 Ok
447 `
448
449 exports[`test/lib/commands/doctor.js TAP discrete checks permissions - windows > logs 1`] = `
450 Object {
451 "error": Array [],
452 "info": Array [
453 "doctor Running checkup",
454 ],
455 "warn": Array [],
456 }
457 `
458
459 exports[`test/lib/commands/doctor.js TAP discrete checks permissions - windows > output 1`] = `
460
461 `
462
463 exports[`test/lib/commands/doctor.js TAP discrete checks ping > logs 1`] = `
464 Object {
465 "error": Array [],
466 "info": Array [
467 "doctor Running checkup",
468 "doctor Pinging registry",
469 ],
470 "warn": Array [],
471 }
472 `
473
474 exports[`test/lib/commands/doctor.js TAP discrete checks ping > output 1`] = `
475 Connecting to the registry
476 Ok
477 `
478
479 exports[`test/lib/commands/doctor.js TAP discrete checks registry > logs 1`] = `
480 Object {
481 "error": Array [],
482 "info": Array [
483 "doctor Running checkup",
484 "doctor Pinging registry",
485 ],
486 "warn": Array [],
487 }
488 `
489
490 exports[`test/lib/commands/doctor.js TAP discrete checks registry > output 1`] = `
491 Connecting to the registry
492 Ok
493 Checking configured npm registry
494 Ok
495 using default registry (https://registry.npmjs.org/)
496 `
497
498 exports[`test/lib/commands/doctor.js TAP discrete checks versions > logs 1`] = `
499 Object {
500 "error": Array [],
501 "info": Array [
502 "doctor Running checkup",
503 "doctor Getting npm package information",
504 "doctor Getting Node.js release information",
505 ],
506 "warn": Array [],
507 }
508 `
509
510 exports[`test/lib/commands/doctor.js TAP discrete checks versions > output 1`] = `
511 Checking npm version
512 Ok
513 current: v1.0.0, latest: v1.0.0
514 Checking node version
515 Ok
516 current: v1.0.0, recommended: v1.0.0
517 `
518
519 exports[`test/lib/commands/doctor.js TAP error reading directory > logs 1`] = `
520 Object {
521 "error": Array [
522 "Some problems found. See above for recommendations.",
523 ],
524 "info": Array [
525 "doctor Running checkup",
526 "doctor Pinging registry",
527 "doctor Getting npm package information",
528 "doctor Getting Node.js release information",
529 "doctor Finding git in your PATH",
530 "doctor getBinPath Finding npm global bin in your PATH",
531 "doctor verifyCachedFiles Verifying the npm cache",
532 String(
533 doctor verifyCachedFiles Verification complete. Stats: {
534 doctor "badContentCount": 0,
535 doctor "reclaimedCount": 0,
536 doctor "missingContent": 0,
537 doctor "verifiedContent": 0
538 doctor }
539 ),
540 ],
541 "warn": Array [
542 "doctor checkFilesPermission error reading directory {CWD}/cache",
543 "doctor checkFilesPermission error reading directory {CWD}/prefix/node_modules",
544 "doctor checkFilesPermission error reading directory {CWD}/global/node_modules",
545 "doctor checkFilesPermission error reading directory {CWD}/prefix/node_modules/.bin",
546 "doctor checkFilesPermission error reading directory {CWD}/global/bin",
547 ],
548 }
549 `
550
551 exports[`test/lib/commands/doctor.js TAP error reading directory > readdir error 1`] = `
552 Connecting to the registry
553 Ok
554 Checking npm version
555 Ok
556 current: v1.0.0, latest: v1.0.0
557 Checking node version
558 Ok
559 current: v1.0.0, recommended: v1.0.0
560 Checking configured npm registry
561 Ok
562 using default registry (https://registry.npmjs.org/)
563 Checking for git executable in PATH
564 Ok
565 /path/to/git
566 Checking for global bin folder in PATH
567 Ok
568 {CWD}/global/bin
569 Checking permissions on cached files (this may take awhile)
570 Not ok
571 Check the permissions of files in {CWD}/cache (should be owned by current user)
572 Checking permissions on local node_modules (this may take awhile)
573 Not ok
574 Check the permissions of files in {CWD}/prefix/node_modules (should be owned by current user)
575 Checking permissions on global node_modules (this may take awhile)
576 Not ok
577 Check the permissions of files in {CWD}/global/node_modules
578 Checking permissions on local bin folder
579 Not ok
580 Check the permissions of files in {CWD}/prefix/node_modules/.bin
581 Checking permissions on global bin folder
582 Not ok
583 Check the permissions of files in {CWD}/global/bin
584 Verifying cache contents (this may take awhile)
585 Ok
586 verified 0 tarballs
587 `
588
589 exports[`test/lib/commands/doctor.js TAP incorrect owner > incorrect owner 1`] = `
590 Connecting to the registry
591 Ok
592 Checking npm version
593 Ok
594 current: v1.0.0, latest: v1.0.0
595 Checking node version
596 Ok
597 current: v1.0.0, recommended: v1.0.0
598 Checking configured npm registry
599 Ok
600 using default registry (https://registry.npmjs.org/)
601 Checking for git executable in PATH
602 Ok
603 /path/to/git
604 Checking for global bin folder in PATH
605 Ok
606 {CWD}/global/bin
607 Checking permissions on cached files (this may take awhile)
608 Not ok
609 Check the permissions of files in {CWD}/cache (should be owned by current user)
610 Checking permissions on local node_modules (this may take awhile)
611 Ok
612 Checking permissions on global node_modules (this may take awhile)
613 Ok
614 Checking permissions on local bin folder
615 Ok
616 Checking permissions on global bin folder
617 Ok
618 Verifying cache contents (this may take awhile)
619 Ok
620 verified 0 tarballs
621 `
622
623 exports[`test/lib/commands/doctor.js TAP incorrect owner > logs 1`] = `
624 Object {
625 "error": Array [
626 "Some problems found. See above for recommendations.",
627 ],
628 "info": Array [
629 "doctor Running checkup",
630 "doctor Pinging registry",
631 "doctor Getting npm package information",
632 "doctor Getting Node.js release information",
633 "doctor Finding git in your PATH",
634 "doctor getBinPath Finding npm global bin in your PATH",
635 "doctor verifyCachedFiles Verifying the npm cache",
636 String(
637 doctor verifyCachedFiles Verification complete. Stats: {
638 doctor "badContentCount": 0,
639 doctor "reclaimedCount": 0,
640 doctor "missingContent": 0,
641 doctor "verifiedContent": 0
642 doctor }
643 ),
644 ],
645 "warn": Array [
646 "doctor checkFilesPermission should be owner of {CWD}/cache/_cacache",
647 ],
648 }
649 `
650
651 exports[`test/lib/commands/doctor.js TAP incorrect permissions > incorrect owner 1`] = `
652 Connecting to the registry
653 Ok
654 Checking npm version
655 Ok
656 current: v1.0.0, latest: v1.0.0
657 Checking node version
658 Ok
659 current: v1.0.0, recommended: v1.0.0
660 Checking configured npm registry
661 Ok
662 using default registry (https://registry.npmjs.org/)
663 Checking for git executable in PATH
664 Ok
665 /path/to/git
666 Checking for global bin folder in PATH
667 Ok
668 {CWD}/global/bin
669 Checking permissions on cached files (this may take awhile)
670 Not ok
671 Check the permissions of files in {CWD}/cache (should be owned by current user)
672 Checking permissions on local node_modules (this may take awhile)
673 Not ok
674 Check the permissions of files in {CWD}/prefix/node_modules (should be owned by current user)
675 Checking permissions on global node_modules (this may take awhile)
676 Not ok
677 Check the permissions of files in {CWD}/global/node_modules
678 Checking permissions on local bin folder
679 Not ok
680 Check the permissions of files in {CWD}/prefix/node_modules/.bin
681 Checking permissions on global bin folder
682 Not ok
683 Check the permissions of files in {CWD}/global/bin
684 Verifying cache contents (this may take awhile)
685 Ok
686 verified 0 tarballs
687 `
688
689 exports[`test/lib/commands/doctor.js TAP incorrect permissions > logs 1`] = `
690 Object {
691 "error": Array [
692 "doctor checkFilesPermission Missing permissions on {CWD}/cache (expect: readable)",
693 "doctor checkFilesPermission Missing permissions on {CWD}/prefix/node_modules (expect: readable, writable)",
694 "doctor checkFilesPermission Missing permissions on {CWD}/global/node_modules (expect: readable)",
695 "doctor checkFilesPermission Missing permissions on {CWD}/prefix/node_modules/.bin (expect: readable, writable, executable)",
696 "doctor checkFilesPermission Missing permissions on {CWD}/global/bin (expect: executable)",
697 "Some problems found. See above for recommendations.",
698 ],
699 "info": Array [
700 "doctor Running checkup",
701 "doctor Pinging registry",
702 "doctor Getting npm package information",
703 "doctor Getting Node.js release information",
704 "doctor Finding git in your PATH",
705 "doctor getBinPath Finding npm global bin in your PATH",
706 "doctor verifyCachedFiles Verifying the npm cache",
707 String(
708 doctor verifyCachedFiles Verification complete. Stats: {
709 doctor "badContentCount": 0,
710 doctor "reclaimedCount": 0,
711 doctor "missingContent": 0,
712 doctor "verifiedContent": 0
713 doctor }
714 ),
715 ],
716 "warn": Array [],
717 }
718 `
719
720 exports[`test/lib/commands/doctor.js TAP missing git > logs 1`] = `
721 Object {
722 "error": Array [
723 "Some problems found. See above for recommendations.",
724 ],
725 "info": Array [
726 "doctor Running checkup",
727 "doctor Pinging registry",
728 "doctor Getting npm package information",
729 "doctor Getting Node.js release information",
730 "doctor Finding git in your PATH",
731 "doctor getBinPath Finding npm global bin in your PATH",
732 "doctor verifyCachedFiles Verifying the npm cache",
733 String(
734 doctor verifyCachedFiles Verification complete. Stats: {
735 doctor "badContentCount": 0,
736 doctor "reclaimedCount": 0,
737 doctor "missingContent": 0,
738 doctor "verifiedContent": 0
739 doctor }
740 ),
741 ],
742 "warn": Array [
743 String(
744 doctor getGitPath Error: test error
745 ),
746 ],
747 }
748 `
749
750 exports[`test/lib/commands/doctor.js TAP missing git > missing git 1`] = `
751 Connecting to the registry
752 Ok
753 Checking npm version
754 Ok
755 current: v1.0.0, latest: v1.0.0
756 Checking node version
757 Ok
758 current: v1.0.0, recommended: v1.0.0
759 Checking configured npm registry
760 Ok
761 using default registry (https://registry.npmjs.org/)
762 Checking for git executable in PATH
763 Not ok
764 Error: Install git and ensure it's in your PATH.
765 Checking for global bin folder in PATH
766 Ok
767 {CWD}/global/bin
768 Checking permissions on cached files (this may take awhile)
769 Ok
770 Checking permissions on local node_modules (this may take awhile)
771 Ok
772 Checking permissions on global node_modules (this may take awhile)
773 Ok
774 Checking permissions on local bin folder
775 Ok
776 Checking permissions on global bin folder
777 Ok
778 Verifying cache contents (this may take awhile)
779 Ok
780 verified 0 tarballs
781 `
782
783 exports[`test/lib/commands/doctor.js TAP missing global directories > logs 1`] = `
784 Object {
785 "error": Array [
786 "Some problems found. See above for recommendations.",
787 ],
788 "info": Array [
789 "doctor Running checkup",
790 "doctor Pinging registry",
791 "doctor Getting npm package information",
792 "doctor Getting Node.js release information",
793 "doctor Finding git in your PATH",
794 "doctor getBinPath Finding npm global bin in your PATH",
795 "doctor verifyCachedFiles Verifying the npm cache",
796 String(
797 doctor verifyCachedFiles Verification complete. Stats: {
798 doctor "badContentCount": 0,
799 doctor "reclaimedCount": 0,
800 doctor "missingContent": 0,
801 doctor "verifiedContent": 0
802 doctor }
803 ),
804 ],
805 "warn": Array [
806 "doctor checkFilesPermission error getting info for {CWD}/global/node_modules",
807 "doctor checkFilesPermission error getting info for {CWD}/global/bin",
808 ],
809 }
810 `
811
812 exports[`test/lib/commands/doctor.js TAP missing global directories > missing global directories 1`] = `
813 Connecting to the registry
814 Ok
815 Checking npm version
816 Ok
817 current: v1.0.0, latest: v1.0.0
818 Checking node version
819 Ok
820 current: v1.0.0, recommended: v1.0.0
821 Checking configured npm registry
822 Ok
823 using default registry (https://registry.npmjs.org/)
824 Checking for git executable in PATH
825 Ok
826 /path/to/git
827 Checking for global bin folder in PATH
828 Ok
829 {CWD}/global/bin
830 Checking permissions on cached files (this may take awhile)
831 Ok
832 Checking permissions on local node_modules (this may take awhile)
833 Ok
834 Checking permissions on global node_modules (this may take awhile)
835 Not ok
836 Check the permissions of files in {CWD}/global/node_modules
837 Checking permissions on local bin folder
838 Ok
839 Checking permissions on global bin folder
840 Not ok
841 Check the permissions of files in {CWD}/global/bin
842 Verifying cache contents (this may take awhile)
843 Ok
844 verified 0 tarballs
845 `
846
847 exports[`test/lib/commands/doctor.js TAP missing local node_modules > logs 1`] = `
848 Object {
849 "error": Array [],
850 "info": Array [
851 "doctor Running checkup",
852 "doctor Pinging registry",
853 "doctor Getting npm package information",
854 "doctor Getting Node.js release information",
855 "doctor Finding git in your PATH",
856 "doctor getBinPath Finding npm global bin in your PATH",
857 "doctor verifyCachedFiles Verifying the npm cache",
858 String(
859 doctor verifyCachedFiles Verification complete. Stats: {
860 doctor "badContentCount": 0,
861 doctor "reclaimedCount": 0,
862 doctor "missingContent": 0,
863 doctor "verifiedContent": 0
864 doctor }
865 ),
866 ],
867 "warn": Array [],
868 }
869 `
870
871 exports[`test/lib/commands/doctor.js TAP missing local node_modules > missing local node_modules 1`] = `
872 Connecting to the registry
873 Ok
874 Checking npm version
875 Ok
876 current: v1.0.0, latest: v1.0.0
877 Checking node version
878 Ok
879 current: v1.0.0, recommended: v1.0.0
880 Checking configured npm registry
881 Ok
882 using default registry (https://registry.npmjs.org/)
883 Checking for git executable in PATH
884 Ok
885 /path/to/git
886 Checking for global bin folder in PATH
887 Ok
888 {CWD}/global/bin
889 Checking permissions on cached files (this may take awhile)
890 Ok
891 Checking permissions on local node_modules (this may take awhile)
892 Ok
893 Checking permissions on global node_modules (this may take awhile)
894 Ok
895 Checking permissions on local bin folder
896 Ok
897 Checking permissions on global bin folder
898 Ok
899 Verifying cache contents (this may take awhile)
900 Ok
901 verified 0 tarballs
902 `
903
904 exports[`test/lib/commands/doctor.js TAP node out of date - current > logs 1`] = `
905 Object {
906 "error": Array [
907 "Some problems found. See above for recommendations.",
908 ],
909 "info": Array [
910 "doctor Running checkup",
911 "doctor Pinging registry",
912 "doctor Getting npm package information",
913 "doctor Getting Node.js release information",
914 "doctor Finding git in your PATH",
915 "doctor getBinPath Finding npm global bin in your PATH",
916 "doctor verifyCachedFiles Verifying the npm cache",
917 String(
918 doctor verifyCachedFiles Verification complete. Stats: {
919 doctor "badContentCount": 0,
920 doctor "reclaimedCount": 0,
921 doctor "missingContent": 0,
922 doctor "verifiedContent": 0
923 doctor }
924 ),
925 ],
926 "warn": Array [],
927 }
928 `
929
930 exports[`test/lib/commands/doctor.js TAP node out of date - current > node is out of date 1`] = `
931 Connecting to the registry
932 Ok
933 Checking npm version
934 Ok
935 current: v1.0.0, latest: v1.0.0
936 Checking node version
937 Not ok
938 Use node v2.0.1 (current: v2.0.0)
939 Checking configured npm registry
940 Ok
941 using default registry (https://registry.npmjs.org/)
942 Checking for git executable in PATH
943 Ok
944 /path/to/git
945 Checking for global bin folder in PATH
946 Ok
947 {CWD}/global/bin
948 Checking permissions on cached files (this may take awhile)
949 Ok
950 Checking permissions on local node_modules (this may take awhile)
951 Ok
952 Checking permissions on global node_modules (this may take awhile)
953 Ok
954 Checking permissions on local bin folder
955 Ok
956 Checking permissions on global bin folder
957 Ok
958 Verifying cache contents (this may take awhile)
959 Ok
960 verified 0 tarballs
961 `
962
963 exports[`test/lib/commands/doctor.js TAP node out of date - lts > logs 1`] = `
964 Object {
965 "error": Array [
966 "Some problems found. See above for recommendations.",
967 ],
968 "info": Array [
969 "doctor Running checkup",
970 "doctor Pinging registry",
971 "doctor Getting npm package information",
972 "doctor Getting Node.js release information",
973 "doctor Finding git in your PATH",
974 "doctor getBinPath Finding npm global bin in your PATH",
975 "doctor verifyCachedFiles Verifying the npm cache",
976 String(
977 doctor verifyCachedFiles Verification complete. Stats: {
978 doctor "badContentCount": 0,
979 doctor "reclaimedCount": 0,
980 doctor "missingContent": 0,
981 doctor "verifiedContent": 0
982 doctor }
983 ),
984 ],
985 "warn": Array [],
986 }
987 `
988
989 exports[`test/lib/commands/doctor.js TAP node out of date - lts > node is out of date 1`] = `
990 Connecting to the registry
991 Ok
992 Checking npm version
993 Ok
994 current: v1.0.0, latest: v1.0.0
995 Checking node version
996 Not ok
997 Use node v1.0.0 (current: v0.0.1)
998 Checking configured npm registry
999 Ok
1000 using default registry (https://registry.npmjs.org/)
1001 Checking for git executable in PATH
1002 Ok
1003 /path/to/git
1004 Checking for global bin folder in PATH
1005 Ok
1006 {CWD}/global/bin
1007 Checking permissions on cached files (this may take awhile)
1008 Ok
1009 Checking permissions on local node_modules (this may take awhile)
1010 Ok
1011 Checking permissions on global node_modules (this may take awhile)
1012 Ok
1013 Checking permissions on local bin folder
1014 Ok
1015 Checking permissions on global bin folder
1016 Ok
1017 Verifying cache contents (this may take awhile)
1018 Ok
1019 verified 0 tarballs
1020 `
1021
1022 exports[`test/lib/commands/doctor.js TAP non-default registry > logs 1`] = `
1023 Object {
1024 "error": Array [
1025 "Some problems found. See above for recommendations.",
1026 ],
1027 "info": Array [
1028 "doctor Running checkup",
1029 "doctor Pinging registry",
1030 "doctor Getting npm package information",
1031 "doctor Getting Node.js release information",
1032 "doctor Finding git in your PATH",
1033 "doctor getBinPath Finding npm global bin in your PATH",
1034 "doctor verifyCachedFiles Verifying the npm cache",
1035 String(
1036 doctor verifyCachedFiles Verification complete. Stats: {
1037 doctor "badContentCount": 0,
1038 doctor "reclaimedCount": 0,
1039 doctor "missingContent": 0,
1040 doctor "verifiedContent": 0
1041 doctor }
1042 ),
1043 ],
1044 "warn": Array [],
1045 }
1046 `
1047
1048 exports[`test/lib/commands/doctor.js TAP non-default registry > non default registry 1`] = `
1049 Connecting to the registry
1050 Ok
1051 Checking npm version
1052 Ok
1053 current: v1.0.0, latest: v1.0.0
1054 Checking node version
1055 Ok
1056 current: v1.0.0, recommended: v1.0.0
1057 Checking configured npm registry
1058 Not ok
1059 Try \`npm config set registry=https://registry.npmjs.org/\`
1060 Checking for git executable in PATH
1061 Ok
1062 /path/to/git
1063 Checking for global bin folder in PATH
1064 Ok
1065 {CWD}/global/bin
1066 Checking permissions on cached files (this may take awhile)
1067 Ok
1068 Checking permissions on local node_modules (this may take awhile)
1069 Ok
1070 Checking permissions on global node_modules (this may take awhile)
1071 Ok
1072 Checking permissions on local bin folder
1073 Ok
1074 Checking permissions on global bin folder
1075 Ok
1076 Verifying cache contents (this may take awhile)
1077 Ok
1078 verified 0 tarballs
1079 `
1080
1081 exports[`test/lib/commands/doctor.js TAP npm out of date > logs 1`] = `
1082 Object {
1083 "error": Array [
1084 "Some problems found. See above for recommendations.",
1085 ],
1086 "info": Array [
1087 "doctor Running checkup",
1088 "doctor Pinging registry",
1089 "doctor Getting npm package information",
1090 "doctor Getting Node.js release information",
1091 "doctor Finding git in your PATH",
1092 "doctor getBinPath Finding npm global bin in your PATH",
1093 "doctor verifyCachedFiles Verifying the npm cache",
1094 String(
1095 doctor verifyCachedFiles Verification complete. Stats: {
1096 doctor "badContentCount": 0,
1097 doctor "reclaimedCount": 0,
1098 doctor "missingContent": 0,
1099 doctor "verifiedContent": 0
1100 doctor }
1101 ),
1102 ],
1103 "warn": Array [],
1104 }
1105 `
1106
1107 exports[`test/lib/commands/doctor.js TAP npm out of date > npm is out of date 1`] = `
1108 Connecting to the registry
1109 Ok
1110 Checking npm version
1111 Not ok
1112 Use npm v2.0.0
1113 Checking node version
1114 Ok
1115 current: v1.0.0, recommended: v1.0.0
1116 Checking configured npm registry
1117 Ok
1118 using default registry (https://registry.npmjs.org/)
1119 Checking for git executable in PATH
1120 Ok
1121 /path/to/git
1122 Checking for global bin folder in PATH
1123 Ok
1124 {CWD}/global/bin
1125 Checking permissions on cached files (this may take awhile)
1126 Ok
1127 Checking permissions on local node_modules (this may take awhile)
1128 Ok
1129 Checking permissions on global node_modules (this may take awhile)
1130 Ok
1131 Checking permissions on local bin folder
1132 Ok
1133 Checking permissions on global bin folder
1134 Ok
1135 Verifying cache contents (this may take awhile)
1136 Ok
1137 verified 0 tarballs
1138 `
1139
1140 exports[`test/lib/commands/doctor.js TAP ping 404 > logs 1`] = `
1141 Object {
1142 "error": Array [
1143 "Some problems found. See above for recommendations.",
1144 ],
1145 "info": Array [
1146 "doctor Running checkup",
1147 "doctor Pinging registry",
1148 "doctor Getting npm package information",
1149 "doctor Getting Node.js release information",
1150 "doctor Finding git in your PATH",
1151 "doctor getBinPath Finding npm global bin in your PATH",
1152 "doctor verifyCachedFiles Verifying the npm cache",
1153 String(
1154 doctor verifyCachedFiles Verification complete. Stats: {
1155 doctor "badContentCount": 0,
1156 doctor "reclaimedCount": 0,
1157 doctor "missingContent": 0,
1158 doctor "verifiedContent": 0
1159 doctor }
1160 ),
1161 ],
1162 "warn": Array [],
1163 }
1164 `
1165
1166 exports[`test/lib/commands/doctor.js TAP ping 404 > ping 404 1`] = `
1167 Connecting to the registry
1168 Not ok
1169 404 404 Not Found - GET https://registry.npmjs.org/-/ping
1170 Checking npm version
1171 Ok
1172 current: v1.0.0, latest: v1.0.0
1173 Checking node version
1174 Ok
1175 current: v1.0.0, recommended: v1.0.0
1176 Checking configured npm registry
1177 Ok
1178 using default registry (https://registry.npmjs.org/)
1179 Checking for git executable in PATH
1180 Ok
1181 /path/to/git
1182 Checking for global bin folder in PATH
1183 Ok
1184 {CWD}/global/bin
1185 Checking permissions on cached files (this may take awhile)
1186 Ok
1187 Checking permissions on local node_modules (this may take awhile)
1188 Ok
1189 Checking permissions on global node_modules (this may take awhile)
1190 Ok
1191 Checking permissions on local bin folder
1192 Ok
1193 Checking permissions on global bin folder
1194 Ok
1195 Verifying cache contents (this may take awhile)
1196 Ok
1197 verified 0 tarballs
1198 `
1199
1200 exports[`test/lib/commands/doctor.js TAP ping 404 in color > logs 1`] = `
1201 Object {
1202 "error": Array [
1203 "Some problems found. See above for recommendations.",
1204 ],
1205 "info": Array [
1206 "/u001b[94mdoctor/u001b[39m Running checkup",
1207 "/u001b[94mdoctor/u001b[39m Pinging registry",
1208 "/u001b[94mdoctor/u001b[39m Getting npm package information",
1209 "/u001b[94mdoctor/u001b[39m Getting Node.js release information",
1210 "/u001b[94mdoctor/u001b[39m Finding git in your PATH",
1211 "/u001b[94mdoctor/u001b[39m getBinPath Finding npm global bin in your PATH",
1212 "/u001b[94mdoctor/u001b[39m verifyCachedFiles Verifying the npm cache",
1213 String(
1214 /u001b[94mdoctor/u001b[39m verifyCachedFiles Verification complete. Stats: {
1215 /u001b[94mdoctor/u001b[39m "badContentCount": 0,
1216 /u001b[94mdoctor/u001b[39m "reclaimedCount": 0,
1217 /u001b[94mdoctor/u001b[39m "missingContent": 0,
1218 /u001b[94mdoctor/u001b[39m "verifiedContent": 0
1219 /u001b[94mdoctor/u001b[39m }
1220 ),
1221 ],
1222 "warn": Array [],
1223 }
1224 `
1225
1226 exports[`test/lib/commands/doctor.js TAP ping 404 in color > ping 404 in color 1`] = `
1227 Connecting to the registry
1228 Not ok
1229 404 404 Not Found - GET https://registry.npmjs.org/-/ping
1230 Checking npm version
1231 Ok
1232 current: v1.0.0, latest: v1.0.0
1233 Checking node version
1234 Ok
1235 current: v1.0.0, recommended: v1.0.0
1236 Checking configured npm registry
1237 Ok
1238 using default registry (https://registry.npmjs.org/)
1239 Checking for git executable in PATH
1240 Ok
1241 /path/to/git
1242 Checking for global bin folder in PATH
1243 Ok
1244 {CWD}/global/bin
1245 Checking permissions on cached files (this may take awhile)
1246 Ok
1247 Checking permissions on local node_modules (this may take awhile)
1248 Ok
1249 Checking permissions on global node_modules (this may take awhile)
1250 Ok
1251 Checking permissions on local bin folder
1252 Ok
1253 Checking permissions on global bin folder
1254 Ok
1255 Verifying cache contents (this may take awhile)
1256 Ok
1257 verified 0 tarballs
1258 `
1259
1260 exports[`test/lib/commands/doctor.js TAP ping exception with code > logs 1`] = `
1261 Object {
1262 "error": Array [
1263 "Some problems found. See above for recommendations.",
1264 ],
1265 "info": Array [
1266 "doctor Running checkup",
1267 "doctor Pinging registry",
1268 "doctor Getting npm package information",
1269 "doctor Getting Node.js release information",
1270 "doctor Finding git in your PATH",
1271 "doctor getBinPath Finding npm global bin in your PATH",
1272 "doctor verifyCachedFiles Verifying the npm cache",
1273 String(
1274 doctor verifyCachedFiles Verification complete. Stats: {
1275 doctor "badContentCount": 0,
1276 doctor "reclaimedCount": 0,
1277 doctor "missingContent": 0,
1278 doctor "verifiedContent": 0
1279 doctor }
1280 ),
1281 ],
1282 "warn": Array [],
1283 }
1284 `
1285
1286 exports[`test/lib/commands/doctor.js TAP ping exception with code > ping failure 1`] = `
1287 Connecting to the registry
1288 Not ok
1289 request to https://registry.npmjs.org/-/ping failed, reason: Test Error
1290 Checking npm version
1291 Ok
1292 current: v1.0.0, latest: v1.0.0
1293 Checking node version
1294 Ok
1295 current: v1.0.0, recommended: v1.0.0
1296 Checking configured npm registry
1297 Ok
1298 using default registry (https://registry.npmjs.org/)
1299 Checking for git executable in PATH
1300 Ok
1301 /path/to/git
1302 Checking for global bin folder in PATH
1303 Ok
1304 {CWD}/global/bin
1305 Checking permissions on cached files (this may take awhile)
1306 Ok
1307 Checking permissions on local node_modules (this may take awhile)
1308 Ok
1309 Checking permissions on global node_modules (this may take awhile)
1310 Ok
1311 Checking permissions on local bin folder
1312 Ok
1313 Checking permissions on global bin folder
1314 Ok
1315 Verifying cache contents (this may take awhile)
1316 Ok
1317 verified 0 tarballs
1318 `
1319
1320 exports[`test/lib/commands/doctor.js TAP ping exception without code > logs 1`] = `
1321 Object {
1322 "error": Array [
1323 "Some problems found. See above for recommendations.",
1324 ],
1325 "info": Array [
1326 "doctor Running checkup",
1327 "doctor Pinging registry",
1328 "doctor Getting npm package information",
1329 "doctor Getting Node.js release information",
1330 "doctor Finding git in your PATH",
1331 "doctor getBinPath Finding npm global bin in your PATH",
1332 "doctor verifyCachedFiles Verifying the npm cache",
1333 String(
1334 doctor verifyCachedFiles Verification complete. Stats: {
1335 doctor "badContentCount": 0,
1336 doctor "reclaimedCount": 0,
1337 doctor "missingContent": 0,
1338 doctor "verifiedContent": 0
1339 doctor }
1340 ),
1341 ],
1342 "warn": Array [],
1343 }
1344 `
1345
1346 exports[`test/lib/commands/doctor.js TAP ping exception without code > ping failure 1`] = `
1347 Connecting to the registry
1348 Not ok
1349 request to https://registry.npmjs.org/-/ping failed, reason: Test Error
1350 Checking npm version
1351 Ok
1352 current: v1.0.0, latest: v1.0.0
1353 Checking node version
1354 Ok
1355 current: v1.0.0, recommended: v1.0.0
1356 Checking configured npm registry
1357 Ok
1358 using default registry (https://registry.npmjs.org/)
1359 Checking for git executable in PATH
1360 Ok
1361 /path/to/git
1362 Checking for global bin folder in PATH
1363 Ok
1364 {CWD}/global/bin
1365 Checking permissions on cached files (this may take awhile)
1366 Ok
1367 Checking permissions on local node_modules (this may take awhile)
1368 Ok
1369 Checking permissions on global node_modules (this may take awhile)
1370 Ok
1371 Checking permissions on local bin folder
1372 Ok
1373 Checking permissions on global bin folder
1374 Ok
1375 Verifying cache contents (this may take awhile)
1376 Ok
1377 verified 0 tarballs
1378 `
1379
1380 exports[`test/lib/commands/doctor.js TAP silent errors > logs 1`] = `
1381 Object {
1382 "error": Array [],
1383 "info": Array [],
1384 "warn": Array [],
1385 }
1386 `
1387
1388 exports[`test/lib/commands/doctor.js TAP silent errors > output 1`] = `
1389
1390 `
1391
1392 exports[`test/lib/commands/doctor.js TAP silent success > logs 1`] = `
1393 Object {
1394 "error": Array [],
1395 "info": Array [],
1396 "warn": Array [],
1397 }
1398 `
1399
1400 exports[`test/lib/commands/doctor.js TAP silent success > output 1`] = `
1401
1402 `
1403
1404 exports[`test/lib/commands/doctor.js TAP windows skips permissions checks > logs 1`] = `
1405 Object {
1406 "error": Array [],
1407 "info": Array [
1408 "doctor Running checkup",
1409 "doctor Pinging registry",
1410 "doctor Getting npm package information",
1411 "doctor Getting Node.js release information",
1412 "doctor Finding git in your PATH",
1413 "doctor getBinPath Finding npm global bin in your PATH",
1414 ],
1415 "warn": Array [],
1416 }
1417 `
1418
1419 exports[`test/lib/commands/doctor.js TAP windows skips permissions checks > no permissions checks 1`] = `
1420 Connecting to the registry
1421 Ok
1422 Checking npm version
1423 Ok
1424 current: v1.0.0, latest: v1.0.0
1425 Checking node version
1426 Ok
1427 current: v1.0.0, recommended: v1.0.0
1428 Checking configured npm registry
1429 Ok
1430 using default registry (https://registry.npmjs.org/)
1431 Checking for git executable in PATH
1432 Ok
1433 /path/to/git
1434 Checking for global bin folder in PATH
1435 Ok
1436 {CWD}/global
1437 `