Skip to content

Commit edb018c

Browse files
committed
test: add npm view
1 parent 48dee1f commit edb018c

File tree

3 files changed

+782
-381
lines changed

3 files changed

+782
-381
lines changed
Lines changed: 290 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,290 @@
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/view.js TAP should log info by field name array field - 1 element > must match snapshot 1`] = `
9+
10+
claudia
11+
`
12+
13+
exports[`test/lib/view.js TAP should log info by field name array field - 2 elements > must match snapshot 1`] = `
14+
15+
maintainers[0].name = 'claudia'
16+
maintainers[1].name = 'isaacs'
17+
`
18+
19+
exports[`test/lib/view.js TAP should log info by field name maintainers with email > must match snapshot 1`] = `
20+
21+
{
22+
"maintainers": [
23+
{
24+
"name": "claudia",
25+
"email": "[email protected]",
26+
"twitter": "cyellow"
27+
},
28+
{
29+
"name": "isaacs",
30+
"email": "[email protected]",
31+
"twitter": "iyellow"
32+
}
33+
],
34+
"name": "yellow"
35+
}
36+
`
37+
38+
exports[`test/lib/view.js TAP should log info by field name maintainers with url > must match snapshot 1`] = `
39+
40+
[
41+
"claudia (http://c.yellow.com)",
42+
"isaacs (http://i.yellow.com)"
43+
]
44+
`
45+
46+
exports[`test/lib/view.js TAP should log info by field name nested field > must match snapshot 1`] = `
47+
48+
"Jeremy Ashkenas"
49+
`
50+
51+
exports[`test/lib/view.js TAP should log info by field name readme > must match snapshot 1`] = `
52+
53+
54+
`
55+
56+
exports[`test/lib/view.js TAP should log info by field name several fields > must match snapshot 1`] = `
57+
58+
{
59+
"name": "underscore",
60+
"version": "1.3.1"
61+
}
62+
`
63+
64+
exports[`test/lib/view.js TAP should log info by field name several fields with several versions > must match snapshot 1`] = `
65+
66+
67+
68+
69+
70+
71+
72+
73+
74+
75+
76+
77+
78+
79+
80+
81+
82+
83+
84+
85+
86+
87+
88+
89+
90+
91+
92+
`
93+
94+
exports[`test/lib/view.js TAP should log info by field name unknown nested field > must match snapshot 1`] = `
95+
96+
97+
`
98+
99+
exports[`test/lib/view.js TAP should log info of package in current working dir non-specific version > must match snapshot 1`] = `
100+
101+
102+
underscore@1.3.1 | Proprietary | deps: none | versions: 26
103+
JavaScript's functional programming helper library.
104+
http://documentcloud.github.com/underscore/
105+
106+
dist
107+
.tarball:http://localhost:1331/underscore/-/underscore-1.3.1.tgz
108+
.shasum:6cb8aad0e77eb5dbbfb54b22bcd8697309cf9641
109+
110+
maintainers:
111+
-jashkenas <[[email protected]>
112+
113+
dist-tags:
114+
latest: 1.5.1
115+
stable: 1.5.1
116+
117+
published over a year ago by jashkenas <[[email protected]>
118+
`
119+
120+
exports[`test/lib/view.js TAP should log info of package in current working dir specific version > must match snapshot 1`] = `
121+
122+
123+
underscore@1.3.1 | Proprietary | deps: none | versions: 26
124+
JavaScript's functional programming helper library.
125+
http://documentcloud.github.com/underscore/
126+
127+
dist
128+
.tarball:http://localhost:1331/underscore/-/underscore-1.3.1.tgz
129+
.shasum:6cb8aad0e77eb5dbbfb54b22bcd8697309cf9641
130+
131+
maintainers:
132+
-jashkenas <[[email protected]>
133+
134+
dist-tags:
135+
latest: 1.5.1
136+
stable: 1.5.1
137+
138+
published over a year ago by jashkenas <[[email protected]>
139+
`
140+
141+
exports[`test/lib/view.js TAP should log package info [email protected] > must match snapshot 1`] = `
142+
143+
144+
mkdirp@0.3.5 | MIT | deps: none | versions: 17
145+
Recursively mkdir, like \`mkdir -p\`
146+
147+
dist
148+
.tarball:http://localhost:1331/mkdirp/-/mkdirp-0.3.5.tgz
149+
.shasum:de3e5f8961c88c787ee1368df849ac4413eca8d7
150+
151+
maintainers:
152+
-substack <[[email protected]>
153+
154+
dist-tags:
155+
latest: 0.3.5
156+
157+
published over a year ago by substack <[[email protected]>
158+
`
159+
160+
exports[`test/lib/view.js TAP should log package info package with homepage > must match snapshot 1`] = `
161+
162+
163+
orange@undefined | Proprietary | deps: none | versions: 2
164+
http://hm.orange.com
165+
166+
dist
167+
.tarball:undefined
168+
.shasum:undefined
169+
.integrity:---
170+
.unpackedSize:1 B
171+
172+
dist-tags:
173+
1.0.1: [object Object]
174+
`
175+
176+
exports[`test/lib/view.js TAP should log package info package with license, bugs, repository and other fields > must match snapshot 1`] = `
177+
178+
179+
green@undefined | ACME | deps: 2 | versions: 2
180+
181+
DEPRECATED ⚠️ - true
182+
183+
keywords:colors, green, crayola
184+
185+
bin:green
186+
187+
dist
188+
.tarball:undefined
189+
.shasum:undefined
190+
.integrity:---
191+
.unpackedSize:1 B
192+
193+
dependencies:
194+
red: [object Object]
195+
yellow: [object Object]
196+
197+
dist-tags:
198+
1.0.1: [object Object]
199+
`
200+
201+
exports[`test/lib/view.js TAP should log package info package with maintainers info > must match snapshot 1`] = `
202+
203+
204+
pink@undefined | Proprietary | deps: none | versions: 2
205+
206+
dist
207+
.tarball:undefined
208+
.shasum:undefined
209+
.integrity:---
210+
.unpackedSize:1 B
211+
212+
dist-tags:
213+
1.0.1: [object Object]
214+
`
215+
216+
exports[`test/lib/view.js TAP should log package info package with more than 25 deps > must match snapshot 1`] = `
217+
218+
219+
black@undefined | Proprietary | deps: 25 | versions: 2
220+
221+
dist
222+
.tarball:undefined
223+
.shasum:undefined
224+
.integrity:---
225+
.unpackedSize:1 B
226+
227+
dependencies:
228+
0: [object Object]
229+
10: [object Object]
230+
11: [object Object]
231+
12: [object Object]
232+
13: [object Object]
233+
14: [object Object]
234+
15: [object Object]
235+
16: [object Object]
236+
17: [object Object]
237+
18: [object Object]
238+
19: [object Object]
239+
1: [object Object]
240+
20: [object Object]
241+
21: [object Object]
242+
22: [object Object]
243+
23: [object Object]
244+
2: [object Object]
245+
3: [object Object]
246+
4: [object Object]
247+
5: [object Object]
248+
6: [object Object]
249+
7: [object Object]
250+
8: [object Object]
251+
9: [object Object]
252+
(...and 1 more.)
253+
254+
dist-tags:
255+
1.0.1: [object Object]
256+
`
257+
258+
exports[`test/lib/view.js TAP should log package info package with no modified time > must match snapshot 1`] = `
259+
260+
261+
cyan@undefined | Proprietary | deps: none | versions: 2
262+
263+
dist
264+
.tarball:undefined
265+
.shasum:undefined
266+
267+
dist-tags:
268+
269+
270+
published by claudia <[[email protected]>
271+
`
272+
273+
exports[`test/lib/view.js TAP should log package info package with no repo or homepage > must match snapshot 1`] = `
274+
275+
276+
blue@undefined | Proprietary | deps: none | versions: 2
277+
278+
dist
279+
.tarball:undefined
280+
.shasum:undefined
281+
282+
dist-tags:
283+
284+
285+
published 12 months ago
286+
`
287+
288+
exports[`test/lib/view.js TAP should log package info package with no versions > must match snapshot 1`] = `
289+
290+
`

0 commit comments

Comments
 (0)