Commit 6b076aa 1 parent 2b91a8a commit 6b076aa Copy full SHA for 6b076aa
File tree 1 file changed +34
-27
lines changed
packages/core/integration-tests/test
1 file changed +34
-27
lines changed Original file line number Diff line number Diff line change @@ -396,34 +396,41 @@ describe('macros', function () {
396
396
mode : 'production' ,
397
397
} ) ;
398
398
} catch ( err ) {
399
- assert . deepEqual ( err . diagnostics , [
400
- {
401
- message : `Error loading macro: Could not resolve module "./macro.js" from "${ path . join (
402
- dir ,
403
- 'index.js' ,
404
- ) } "`,
405
- origin : '@parcel/transformer-js' ,
406
- codeFrames : [
407
- {
408
- filePath : path . join ( dir , 'index.js' ) ,
409
- codeHighlights : [
410
- {
411
- message : undefined ,
412
- start : {
413
- line : 1 ,
414
- column : 1 ,
399
+ assert . deepEqual (
400
+ // \ gets escaped by Node -> Rust -> Node in Windows, so we normalize it for the test
401
+ err . diagnostics . map ( d => ( {
402
+ ...d ,
403
+ message : d . message . replace ( / \\ \\ / g, '\\' ) ,
404
+ } ) ) ,
405
+ [
406
+ {
407
+ message : `Error loading macro: Could not resolve module "./macro.js" from "${ path . join (
408
+ dir ,
409
+ 'index.js' ,
410
+ ) } "`,
411
+ origin : '@parcel/transformer-js' ,
412
+ codeFrames : [
413
+ {
414
+ filePath : path . join ( dir , 'index.js' ) ,
415
+ codeHighlights : [
416
+ {
417
+ message : undefined ,
418
+ start : {
419
+ line : 1 ,
420
+ column : 1 ,
421
+ } ,
422
+ end : {
423
+ line : 1 ,
424
+ column : 57 ,
425
+ } ,
415
426
} ,
416
- end : {
417
- line : 1 ,
418
- column : 57 ,
419
- } ,
420
- } ,
421
- ] ,
422
- } ,
423
- ] ,
424
- hints : null ,
425
- } ,
426
- ] ) ;
427
+ ] ,
428
+ } ,
429
+ ] ,
430
+ hints : null ,
431
+ } ,
432
+ ] ,
433
+ ) ;
427
434
}
428
435
} ) ;
429
436
You can’t perform that action at this time.
0 commit comments