@@ -17,14 +17,22 @@ test('playwright js test works and reports data', async (t) => {
17
17
const output =
18
18
await $ `../artillery/bin/run run ./test/fixtures/pw-acceptance.yml --output ${ playwrightOutput } ` ;
19
19
20
- t . equal ( output . exitCode , 0 ) ;
20
+ t . equal (
21
+ output . exitCode ,
22
+ 0 ,
23
+ `should have exit code 0, got ${ output . exitCode } `
24
+ ) ;
21
25
22
26
const jsonReportAggregate = JSON . parse (
23
27
fs . readFileSync ( playwrightOutput , 'utf8' )
24
28
) . aggregate ;
25
29
26
30
//Assert: should have no failed VUs
27
- t . equal ( jsonReportAggregate . counters [ 'vusers.failed' ] , 0 ) ;
31
+ t . equal (
32
+ jsonReportAggregate . counters [ 'vusers.failed' ] ,
33
+ 0 ,
34
+ 'should have no failed VUs'
35
+ ) ;
28
36
29
37
//Assert: should have done http_requests and reported codes
30
38
t . ok (
@@ -105,7 +113,11 @@ test('playwright js test fails and has correct vu count when expectation fails',
105
113
try {
106
114
await $ `../artillery/bin/run run ./test/fixtures/pw-acceptance.yml --output ${ playwrightOutput } --overrides ${ scenarioOverride } ` ;
107
115
} catch ( output ) {
108
- t . equal ( output . exitCode , 1 ) ;
116
+ t . equal (
117
+ output . exitCode ,
118
+ 1 ,
119
+ `should have exit code 1, got ${ output . exitCode } `
120
+ ) ;
109
121
110
122
const jsonReportAggregate = JSON . parse (
111
123
fs . readFileSync ( playwrightOutput , 'utf8' )
@@ -131,14 +143,22 @@ test('playwright typescript test works and reports data', async (t) => {
131
143
const output =
132
144
await $ `../artillery/bin/run run ./test/fixtures/pw-acceptance.yml --output ${ playwrightOutput } --overrides ${ configOverride } ` ;
133
145
134
- t . equal ( output . exitCode , 0 ) ;
146
+ t . equal (
147
+ output . exitCode ,
148
+ 0 ,
149
+ `should have exit code 0, got ${ output . exitCode } `
150
+ ) ;
135
151
136
152
const jsonReportAggregate = JSON . parse (
137
153
fs . readFileSync ( playwrightOutput , 'utf8' )
138
154
) . aggregate ;
139
155
140
156
//Assert: should have no failed VUs
141
- t . equal ( jsonReportAggregate . counters [ 'vusers.failed' ] , 0 ) ;
157
+ t . equal (
158
+ jsonReportAggregate . counters [ 'vusers.failed' ] ,
159
+ 0 ,
160
+ 'should have no failed VUs'
161
+ ) ;
142
162
143
163
//Assert: should have done http_requests and reported codes
144
164
t . ok (
@@ -222,7 +242,11 @@ test('playwright typescript test fails and has correct vu count when expectation
222
242
try {
223
243
await $ `../artillery/bin/run run ./test/fixtures/pw-acceptance.yml --output ${ playwrightOutput } --overrides ${ scenarioOverride } ` ;
224
244
} catch ( output ) {
225
- t . equal ( output . exitCode , 1 ) ;
245
+ t . equal (
246
+ output . exitCode ,
247
+ 1 ,
248
+ `should have exit code 1, got ${ output . exitCode } `
249
+ ) ;
226
250
227
251
const jsonReportAggregate = JSON . parse (
228
252
fs . readFileSync ( playwrightOutput , 'utf8' )
0 commit comments