File tree 1 file changed +8
-2
lines changed 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,19 @@ for (let testCase of cases) {
38
38
const actualMap = prepareMap ( fs . readFileSync ( folder + '/dist/build.js.map' , 'utf8' ) ) ;
39
39
const expectedMap = prepareMap ( fs . readFileSync ( folder + '/reference/build.js.map' , 'utf8' ) ) ;
40
40
41
- t . equal ( actualMap , expectedMap , 'Test sourcemap passed' ) ;
41
+ t . deepEqual ( actualMap , expectedMap , 'Test sourcemap passed' ) ;
42
42
} ) ;
43
43
44
44
t . plan ( 2 ) ;
45
45
} ) ;
46
46
}
47
47
48
48
function prepareMap ( content ) {
49
- return crlf . setLineEnding ( content , 'LF' ) . replace ( / w e b p a c k \/ b o o t s t r a p [ \d \w ] + / g, 'webpack/bootstrap [hash]' ) ; // remove hash from map
49
+ const map = JSON . parse ( content . replace ( / w e b p a c k \/ b o o t s t r a p [ \d \w ] + / g, 'webpack/bootstrap [hash]' ) ) ; // remove hash from map
50
+
51
+ map . sourcesContent = map . sourcesContent . map ( ( sourceContent ) => {
52
+ return crlf . setLineEnding ( sourceContent , 'LF' ) ;
53
+ } ) ;
54
+
55
+ return map ;
50
56
}
You can’t perform that action at this time.
0 commit comments