Debian Codegraph @

tap-snapshots/test/lib/commands/run-script.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/run-script.js TAP list scripts no args > basic report 1`] = `
9 Lifecycle scripts included in [email protected]:
10 test
11 exit 2
12 start
13 node server.js
14 stop
15 node kill-server.js
16 available via \`npm run-script\`:
17 preenv
18 echo before the env
19 postenv
20 echo after the env
21 `
22
23 exports[`test/lib/commands/run-script.js TAP list scripts parseable > must match snapshot 1`] = `
24 test:exit 2
25 start:node server.js
26 stop:node kill-server.js
27 preenv:echo before the env
28 postenv:echo after the env
29 `
30
31 exports[`test/lib/commands/run-script.js TAP list scripts warn json > json report 1`] = `
32 {
33 "test": "exit 2",
34 "start": "node server.js",
35 "stop": "node kill-server.js",
36 "preenv": "echo before the env",
37 "postenv": "echo after the env"
38 }
39 `
40
41 exports[`test/lib/commands/run-script.js TAP list scripts, only commands > must match snapshot 1`] = `
42 Lifecycle scripts included in [email protected]:
43 preversion
44 echo doing the version dance
45 `
46
47 exports[`test/lib/commands/run-script.js TAP list scripts, only non-commands > must match snapshot 1`] = `
48 Scripts available in [email protected] via \`npm run-script\`:
49 glorp
50 echo doing the glerp glop
51 `
52
53 exports[`test/lib/commands/run-script.js TAP workspaces failed workspace run with succeeded runs > should log error msgs for each workspace script 1`] = `
54 Lifecycle script \`glorp\` failed with error:
55 code ERR
56 workspace [email protected]
57 location {CWD}/prefix/packages/a
58 ERR
59 `
60
61 exports[`test/lib/commands/run-script.js TAP workspaces list all scripts --json > must match snapshot 1`] = `
62 {
63 "a": {
64 "glorp": "echo a doing the glerp glop"
65 },
66 "b": {
67 "glorp": "echo b doing the glerp glop"
68 },
69 "c": {
70 "test": "exit 0",
71 "posttest": "echo posttest",
72 "lorem": "echo c lorem"
73 },
74 "d": {
75 "test": "exit 0",
76 "posttest": "echo posttest"
77 },
78 "e": {
79 "test": "exit 0",
80 "start": "echo start something"
81 },
82 "noscripts": {}
83 }
84 `
85
86 exports[`test/lib/commands/run-script.js TAP workspaces list all scripts --parseable > must match snapshot 1`] = `
87 a:glorp:echo a doing the glerp glop
88 b:glorp:echo b doing the glerp glop
89 c:test:exit 0
90 c:posttest:echo posttest
91 c:lorem:echo c lorem
92 d:test:exit 0
93 d:posttest:echo posttest
94 e:test:exit 0
95 e:start:echo start something
96 `
97
98 exports[`test/lib/commands/run-script.js TAP workspaces list all scripts > must match snapshot 1`] = `
99 Scripts available in [email protected] via \`npm run-script\`:
100 glorp
101 echo a doing the glerp glop
102
103 Scripts available in [email protected] via \`npm run-script\`:
104 glorp
105 echo b doing the glerp glop
106
107 Lifecycle scripts included in [email protected]:
108 test
109 exit 0
110 posttest
111 echo posttest
112 available via \`npm run-script\`:
113 lorem
114 echo c lorem
115
116 Lifecycle scripts included in [email protected]:
117 test
118 exit 0
119 posttest
120 echo posttest
121
122 Lifecycle scripts included in e:
123 test
124 exit 0
125 start
126 echo start something
127 `
128
129 exports[`test/lib/commands/run-script.js TAP workspaces list all scripts with colors > must match snapshot 1`] = `
130 Scripts available in [[email protected] via \`npm run-script\`:
131 glorp
132 echo a doing the glerp glop
133
134 Scripts available in [[email protected] via \`npm run-script\`:
135 glorp
136 echo b doing the glerp glop
137
138 Lifecycle scripts included in [[email protected]:
139 test
140 exit 0
141 posttest
142 echo posttest
143 available via \`npm run-script\`:
144 lorem
145 echo c lorem
146
147 Lifecycle scripts included in [[email protected]:
148 test
149 exit 0
150 posttest
151 echo posttest
152
153 Lifecycle scripts included in e:
154 test
155 exit 0
156 start
157 echo start something
158 `
159
160 exports[`test/lib/commands/run-script.js TAP workspaces list regular scripts, filtered by name > must match snapshot 1`] = `
161 Scripts available in [email protected] via \`npm run-script\`:
162 glorp
163 echo a doing the glerp glop
164
165 Scripts available in [email protected] via \`npm run-script\`:
166 glorp
167 echo b doing the glerp glop
168 `
169
170 exports[`test/lib/commands/run-script.js TAP workspaces list regular scripts, filtered by parent folder > must match snapshot 1`] = `
171 Scripts available in [email protected] via \`npm run-script\`:
172 glorp
173 echo a doing the glerp glop
174
175 Scripts available in [email protected] via \`npm run-script\`:
176 glorp
177 echo b doing the glerp glop
178
179 Lifecycle scripts included in [email protected]:
180 test
181 exit 0
182 posttest
183 echo posttest
184 available via \`npm run-script\`:
185 lorem
186 echo c lorem
187
188 Lifecycle scripts included in [email protected]:
189 test
190 exit 0
191 posttest
192 echo posttest
193
194 Lifecycle scripts included in e:
195 test
196 exit 0
197 start
198 echo start something
199 `
200
201 exports[`test/lib/commands/run-script.js TAP workspaces list regular scripts, filtered by path > must match snapshot 1`] = `
202 Scripts available in [email protected] via \`npm run-script\`:
203 glorp
204 echo a doing the glerp glop
205 `
206
207 exports[`test/lib/commands/run-script.js TAP workspaces missing scripts in all workspaces > should log error msgs for each workspace script 1`] = `
208 Lifecycle script \`missing-script\` failed with error:
209 workspace [email protected]
210 location {CWD}/prefix/packages/a
211 Missing script: "missing-script"
212 npm error
213 To see a list of scripts, run:
214 npm run [email protected]
215 Lifecycle script \`missing-script\` failed with error:
216 workspace [email protected]
217 location {CWD}/prefix/packages/b
218 Missing script: "missing-script"
219 npm error
220 To see a list of scripts, run:
221 npm run [email protected]
222 Lifecycle script \`missing-script\` failed with error:
223 workspace [email protected]
224 location {CWD}/prefix/packages/c
225 Missing script: "missing-script"
226 npm error
227 To see a list of scripts, run:
228 npm run [email protected]
229 Lifecycle script \`missing-script\` failed with error:
230 workspace [email protected]
231 location {CWD}/prefix/packages/d
232 Missing script: "missing-script"
233 npm error
234 To see a list of scripts, run:
235 npm run [email protected]
236 Lifecycle script \`missing-script\` failed with error:
237 workspace e
238 location {CWD}/prefix/packages/e
239 Missing script: "missing-script"
240 npm error
241 To see a list of scripts, run:
242 npm run --workspace=e
243 Lifecycle script \`missing-script\` failed with error:
244 workspace [email protected]
245 location {CWD}/prefix/packages/noscripts
246 Missing script: "missing-script"
247 npm error
248 To see a list of scripts, run:
249 npm run [email protected]
250 `
251
252 exports[`test/lib/commands/run-script.js TAP workspaces missing scripts in some workspaces > should log error msgs for each workspace script 1`] = `
253 Lifecycle script \`test\` failed with error:
254 workspace [email protected]
255 location {CWD}/prefix/packages/a
256 Missing script: "test"
257 npm error
258 To see a list of scripts, run:
259 npm run [email protected]
260 Lifecycle script \`test\` failed with error:
261 workspace [email protected]
262 location {CWD}/prefix/packages/b
263 Missing script: "test"
264 npm error
265 To see a list of scripts, run:
266 npm run [email protected]
267 `
268
269 exports[`test/lib/commands/run-script.js TAP workspaces single failed workspace run > should log error msgs for each workspace script 1`] = `
270 Lifecycle script \`test\` failed with error:
271 workspace [email protected]
272 location {CWD}/prefix/packages/c
273 err
274 `