@@ -205,14 +205,14 @@ describe("Errors", () => {
205205 entry : "./entry-point-error-loader-required.js"
206206 } ,
207207 ( errors , warnings ) => {
208- warnings . length . should . be . eql ( 1 ) ;
209- warnings [ 0 ]
210- . split ( "\n" ) [ 1 ]
211- . should . match ( / ^ M o d u l e W a r n i n g \( f r o m . \/ e m i t - e r r o r - l o a d e r . j s \) : $ / ) ;
212- errors . length . should . be . eql ( 1 ) ;
213- errors [ 0 ]
214- . split ( "\n" ) [ 1 ]
215- . should . match ( / ^ M o d u l e E r r o r \( f r o m . \/ e m i t - e r r o r - l o a d e r . j s \) : $ / ) ;
208+ expect ( warnings ) . toHaveLength ( 1 ) ;
209+ expect ( warnings [ 0 ] . split ( "\n" ) [ 1 ] ) . toMatch (
210+ / ^ M o d u l e W a r n i n g \( f r o m . \/ e m i t - e r r o r - l o a d e r . j s \) : $ /
211+ ) ;
212+ expect ( errors ) . toHaveLength ( 1 ) ;
213+ expect ( errors [ 0 ] . split ( "\n" ) [ 1 ] ) . toMatch (
214+ / ^ M o d u l e E r r o r \( f r o m . \/ e m i t - e r r o r - l o a d e r . j s \) : $ /
215+ ) ;
216216 }
217217 ) ,
218218 getErrorsPromise (
@@ -221,14 +221,14 @@ describe("Errors", () => {
221221 entry : path . resolve ( base , "./emit-error-loader" ) + "!./entry-point.js"
222222 } ,
223223 ( errors , warnings ) => {
224- warnings . length . should . be . eql ( 1 ) ;
225- warnings [ 0 ]
226- . split ( "\n" ) [ 1 ]
227- . should . match ( / ^ M o d u l e W a r n i n g \( f r o m . \/ e m i t - e r r o r - l o a d e r . j s \) : $ / ) ;
228- errors . length . should . be . eql ( 1 ) ;
229- errors [ 0 ]
230- . split ( "\n" ) [ 1 ]
231- . should . match ( / ^ M o d u l e E r r o r \( f r o m . \/ e m i t - e r r o r - l o a d e r . j s \) : $ / ) ;
224+ expect ( warnings ) . toHaveLength ( 1 ) ;
225+ expect ( warnings [ 0 ] . split ( "\n" ) [ 1 ] ) . toMatch (
226+ / ^ M o d u l e W a r n i n g \( f r o m . \/ e m i t - e r r o r - l o a d e r . j s \) : $ /
227+ ) ;
228+ expect ( errors ) . toHaveLength ( 1 ) ;
229+ expect ( errors [ 0 ] . split ( "\n" ) [ 1 ] ) . toMatch (
230+ / ^ M o d u l e E r r o r \( f r o m . \/ e m i t - e r r o r - l o a d e r . j s \) : $ /
231+ ) ;
232232 }
233233 ) ,
234234 getErrorsPromise (
@@ -250,19 +250,17 @@ describe("Errors", () => {
250250 }
251251 } ,
252252 ( errors , warnings ) => {
253- warnings . length . should . be . eql ( 1 ) ;
254- warnings [ 0 ]
255- . split ( "\n" ) [ 1 ]
256- . should . match ( / ^ M o d u l e W a r n i n g \( f r o m .\/ e m i t - e r r o r - l o a d e r .j s \) : $ / ) ;
257- errors . length . should . be . eql ( 2 ) ;
258- errors [ 0 ]
259- . split ( "\n" ) [ 1 ]
260- . should . match ( / ^ M o d u l e E r r o r \( f r o m .\/ e m i t - e r r o r - l o a d e r .j s \) : $ / ) ;
261- errors [ 1 ]
262- . split ( "\n" ) [ 1 ]
263- . should . match (
264- / ^ M o d u l e b u i l d f a i l e d \( f r o m \( w e b p a c k \) \/ n o d e _ m o d u l e s \/ j s o n - l o a d e r \/ i n d e x .j s \) : $ /
265- ) ;
253+ expect ( warnings ) . toHaveLength ( 1 ) ;
254+ expect ( warnings [ 0 ] . split ( "\n" ) [ 1 ] ) . toMatch (
255+ / ^ M o d u l e W a r n i n g \( f r o m .\/ e m i t - e r r o r - l o a d e r .j s \) : $ /
256+ ) ;
257+ expect ( errors ) . toHaveLength ( 2 ) ;
258+ expect ( errors [ 0 ] . split ( "\n" ) [ 1 ] ) . toMatch (
259+ / ^ M o d u l e E r r o r \( f r o m .\/ e m i t - e r r o r - l o a d e r .j s \) : $ /
260+ ) ;
261+ expect ( errors [ 1 ] . split ( "\n" ) [ 1 ] ) . toMatch (
262+ / ^ M o d u l e b u i l d f a i l e d \( f r o m \( w e b p a c k \) \/ n o d e _ m o d u l e s \/ j s o n - l o a d e r \/ i n d e x .j s \) : $ /
263+ ) ;
266264 }
267265 ) ,
268266 getErrorsPromise (
@@ -279,12 +277,10 @@ describe("Errors", () => {
279277 }
280278 } ,
281279 ( errors , warnings ) => {
282- errors . length . should . be . eql ( 1 ) ;
283- errors [ 0 ]
284- . split ( "\n" ) [ 1 ]
285- . should . match (
286- / ^ M o d u l e b u i l d f a i l e d \( f r o m .\/ a s y n c - e r r o r - l o a d e r .j s \) : $ /
287- ) ;
280+ expect ( errors ) . toHaveLength ( 1 ) ;
281+ expect ( errors [ 0 ] . split ( "\n" ) [ 1 ] ) . toMatch (
282+ / ^ M o d u l e b u i l d f a i l e d \( f r o m .\/ a s y n c - e r r o r - l o a d e r .j s \) : $ /
283+ ) ;
288284 }
289285 ) ,
290286 getErrorsPromise (
@@ -301,12 +297,10 @@ describe("Errors", () => {
301297 }
302298 } ,
303299 ( errors , warnings ) => {
304- errors . length . should . be . eql ( 1 ) ;
305- errors [ 0 ]
306- . split ( "\n" ) [ 1 ]
307- . should . match (
308- / ^ M o d u l e b u i l d f a i l e d \( f r o m .\/ t h r o w - e r r o r - l o a d e r .j s \) : $ /
309- ) ;
300+ expect ( errors ) . toHaveLength ( 1 ) ;
301+ expect ( errors [ 0 ] . split ( "\n" ) [ 1 ] ) . toMatch (
302+ / ^ M o d u l e b u i l d f a i l e d \( f r o m .\/ t h r o w - e r r o r - l o a d e r .j s \) : $ /
303+ ) ;
310304 }
311305 ) ,
312306 getErrorsPromise (
@@ -323,34 +317,24 @@ describe("Errors", () => {
323317 }
324318 } ,
325319 ( errors , warnings ) => {
326- warnings . length . should . be . eql ( 2 ) ;
327- warnings [ 0 ]
328- . split ( "\n" ) [ 1 ]
329- . should . match (
330- / ^ M o d u l e W a r n i n g \( f r o m .\/ i r r e g u l a r - e r r o r - l o a d e r .j s \) : $ /
331- ) ;
332- warnings [ 1 ]
333- . split ( "\n" ) [ 1 ]
334- . should . match (
335- / ^ M o d u l e W a r n i n g \( f r o m .\/ i r r e g u l a r - e r r o r - l o a d e r .j s \) : $ /
336- ) ;
320+ expect ( warnings ) . toHaveLength ( 2 ) ;
321+ expect ( warnings [ 0 ] . split ( "\n" ) [ 1 ] ) . toMatch (
322+ / ^ M o d u l e W a r n i n g \( f r o m .\/ i r r e g u l a r - e r r o r - l o a d e r .j s \) : $ /
323+ ) ;
324+ expect ( warnings [ 1 ] . split ( "\n" ) [ 1 ] ) . toMatch (
325+ / ^ M o d u l e W a r n i n g \( f r o m .\/ i r r e g u l a r - e r r o r - l o a d e r .j s \) : $ /
326+ ) ;
337327
338- errors . length . should . be . eql ( 3 ) ;
339- errors [ 0 ]
340- . split ( "\n" ) [ 1 ]
341- . should . match (
342- / ^ M o d u l e E r r o r \( f r o m .\/ i r r e g u l a r - e r r o r - l o a d e r .j s \) : $ /
343- ) ;
344- errors [ 1 ]
345- . split ( "\n" ) [ 1 ]
346- . should . match (
347- / ^ M o d u l e E r r o r \( f r o m .\/ i r r e g u l a r - e r r o r - l o a d e r .j s \) : $ /
348- ) ;
349- errors [ 2 ]
350- . split ( "\n" ) [ 1 ]
351- . should . match (
352- / ^ M o d u l e b u i l d f a i l e d \( f r o m .\/ i r r e g u l a r - e r r o r - l o a d e r .j s \) : $ /
353- ) ;
328+ expect ( errors ) . toHaveLength ( 3 ) ;
329+ expect ( errors [ 0 ] . split ( "\n" ) [ 1 ] ) . toMatch (
330+ / ^ M o d u l e E r r o r \( f r o m .\/ i r r e g u l a r - e r r o r - l o a d e r .j s \) : $ /
331+ ) ;
332+ expect ( errors [ 1 ] . split ( "\n" ) [ 1 ] ) . toMatch (
333+ / ^ M o d u l e E r r o r \( f r o m .\/ i r r e g u l a r - e r r o r - l o a d e r .j s \) : $ /
334+ ) ;
335+ expect ( errors [ 2 ] . split ( "\n" ) [ 1 ] ) . toMatch (
336+ / ^ M o d u l e b u i l d f a i l e d \( f r o m .\/ i r r e g u l a r - e r r o r - l o a d e r .j s \) : $ /
337+ ) ;
354338 }
355339 )
356340 ] ) ;
@@ -362,10 +346,10 @@ describe("Errors", () => {
362346 entry : path . resolve ( base , "./no-return-loader" ) + "!./entry-point.js"
363347 } ,
364348 ( errors , warnings ) => {
365- errors . length . should . be . eql ( 1 ) ;
349+ expect ( errors ) . toHaveLength ( 1 ) ;
366350 const messages = errors [ 0 ] . split ( "\n" ) ;
367- messages [ 1 ] . should . match ( / ^ M o d u l e b u i l d f a i l e d : $ / ) ;
368- messages [ 2 ] . should . match ( / d i d n ' t r e t u r n / ) ;
351+ expect ( messages [ 1 ] ) . toMatch ( / ^ M o d u l e b u i l d f a i l e d : $ / ) ;
352+ expect ( messages [ 2 ] ) . toMatch ( / d i d n ' t r e t u r n / ) ;
369353 done ( ) ;
370354 }
371355 ) ;
0 commit comments