@@ -92,7 +92,7 @@ function compareStackTrace(sourceMap, source, expected) {
92
92
delete require . cache [ require . resolve ( './.generated' ) ] ;
93
93
require ( './.generated' ) . test ( ) ;
94
94
} catch ( e ) {
95
- compareLines ( e . stack . split ( '\n' ) , expected ) ;
95
+ compareLines ( e . stack . split ( / \r \n | \n / ) , expected ) ;
96
96
}
97
97
fs . unlinkSync ( '.generated.js' ) ;
98
98
fs . unlinkSync ( '.generated.js.map' ) ;
@@ -105,7 +105,7 @@ function compareStackTrace(sourceMap, source, expected) {
105
105
delete require . cache [ require . resolve ( './.generated' ) ] ;
106
106
require ( './.generated' ) . test ( ) ;
107
107
} catch ( e ) {
108
- compareLines ( e . stack . split ( '\n' ) , expected ) ;
108
+ compareLines ( e . stack . split ( / \r \n | \n / ) , expected ) ;
109
109
}
110
110
fs . unlinkSync ( '.generated.js' ) ;
111
111
}
@@ -120,7 +120,7 @@ function compareStdout(done, sourceMap, source, expected) {
120
120
compareLines (
121
121
( stdout + stderr )
122
122
. trim ( )
123
- . split ( '\n' )
123
+ . split ( / \r \n | \n / )
124
124
. filter ( function ( line ) { return line !== '' } ) , // Empty lines are not relevant.
125
125
expected
126
126
) ;
@@ -139,7 +139,7 @@ it('normal throw', function() {
139
139
'throw new Error("test");'
140
140
] , [
141
141
'Error: test' ,
142
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
142
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
143
143
] ) ;
144
144
} ) ;
145
145
@@ -151,8 +151,8 @@ it('throw inside function', function() {
151
151
'foo();'
152
152
] , [
153
153
'Error: test' ,
154
- / ^ a t f o o \( (?: .* \/ ) ? l i n e 2 \. j s : 1 0 0 2 : 1 0 2 \) $ / ,
155
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? l i n e 4 \. j s : 1 0 0 4 : 1 0 4 \) $ /
154
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? l i n e 2 \. j s : 1 0 0 2 : 1 0 2 \) $ / ,
155
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? l i n e 4 \. j s : 1 0 0 4 : 1 0 4 \) $ /
156
156
] ) ;
157
157
} ) ;
158
158
@@ -167,9 +167,9 @@ it('throw inside function inside function', function() {
167
167
'foo();'
168
168
] , [
169
169
'Error: test' ,
170
- / ^ a t b a r \( (?: .* \/ ) ? l i n e 3 \. j s : 1 0 0 3 : 1 0 3 \) $ / ,
171
- / ^ a t f o o \( (?: .* \/ ) ? l i n e 5 \. j s : 1 0 0 5 : 1 0 5 \) $ / ,
172
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? l i n e 7 \. j s : 1 0 0 7 : 1 0 7 \) $ /
170
+ / ^ a t b a r \( (?: .* [ / \\ ] ) ? l i n e 3 \. j s : 1 0 0 3 : 1 0 3 \) $ / ,
171
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? l i n e 5 \. j s : 1 0 0 5 : 1 0 5 \) $ / ,
172
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? l i n e 7 \. j s : 1 0 0 7 : 1 0 7 \) $ /
173
173
] ) ;
174
174
} ) ;
175
175
@@ -180,9 +180,9 @@ it('eval', function() {
180
180
'Error: test' ,
181
181
182
182
// Before Node 4, `Object.eval`, after just `eval`.
183
- / ^ a t (?: O b j e c t \. ) ? e v a l \( e v a l a t ( < a n o n y m o u s > | e x p o r t s .t e s t ) \( (?: .* \/ ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) / ,
183
+ / ^ a t (?: O b j e c t \. ) ? e v a l \( e v a l a t ( < a n o n y m o u s > | e x p o r t s .t e s t ) \( (?: .* [ / \\ ] ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) / ,
184
184
185
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
185
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
186
186
] ) ;
187
187
} ) ;
188
188
@@ -191,9 +191,9 @@ it('eval inside eval', function() {
191
191
'eval("eval(\'throw new Error(\\"test\\")\')");'
192
192
] , [
193
193
'Error: test' ,
194
- / ^ a t (?: O b j e c t \. ) ? e v a l \( e v a l a t ( < a n o n y m o u s > | e x p o r t s .t e s t ) \( e v a l a t ( < a n o n y m o u s > | e x p o r t s .t e s t ) \( (?: .* \/ ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) / ,
195
- / ^ a t (?: O b j e c t \. ) ? e v a l \( e v a l a t ( < a n o n y m o u s > | e x p o r t s .t e s t ) \( (?: .* \/ ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) / ,
196
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
194
+ / ^ a t (?: O b j e c t \. ) ? e v a l \( e v a l a t ( < a n o n y m o u s > | e x p o r t s .t e s t ) \( e v a l a t ( < a n o n y m o u s > | e x p o r t s .t e s t ) \( (?: .* [ / \\ ] ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) / ,
195
+ / ^ a t (?: O b j e c t \. ) ? e v a l \( e v a l a t ( < a n o n y m o u s > | e x p o r t s .t e s t ) \( (?: .* [ / \\ ] ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) / ,
196
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
197
197
] ) ;
198
198
} ) ;
199
199
@@ -205,9 +205,9 @@ it('eval inside function', function() {
205
205
'foo();'
206
206
] , [
207
207
'Error: test' ,
208
- / ^ a t e v a l \( e v a l a t f o o \( (?: .* \/ ) ? l i n e 2 \. j s : 1 0 0 2 : 1 0 2 \) / ,
209
- / ^ a t f o o \( (?: .* \/ ) ? l i n e 2 \. j s : 1 0 0 2 : 1 0 2 \) / ,
210
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? l i n e 4 \. j s : 1 0 0 4 : 1 0 4 \) $ /
208
+ / ^ a t e v a l \( e v a l a t f o o \( (?: .* [ / \\ ] ) ? l i n e 2 \. j s : 1 0 0 2 : 1 0 2 \) / ,
209
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? l i n e 2 \. j s : 1 0 0 2 : 1 0 2 \) / ,
210
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? l i n e 4 \. j s : 1 0 0 4 : 1 0 4 \) $ /
211
211
] ) ;
212
212
} ) ;
213
213
@@ -217,7 +217,7 @@ it('eval with sourceURL', function() {
217
217
] , [
218
218
'Error: test' ,
219
219
/ ^ a t (?: O b j e c t \. ) ? e v a l \( s o u r c e U R L \. j s : 1 : 7 \) $ / ,
220
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
220
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
221
221
] ) ;
222
222
} ) ;
223
223
@@ -227,8 +227,8 @@ it('eval with sourceURL inside eval', function() {
227
227
] , [
228
228
'Error: test' ,
229
229
/ ^ a t (?: O b j e c t \. ) ? e v a l \( s o u r c e U R L \. j s : 1 : 7 \) $ / ,
230
- / ^ a t (?: O b j e c t \. ) ? e v a l \( e v a l a t ( < a n o n y m o u s > | e x p o r t s .t e s t ) \( (?: .* \/ ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) / ,
231
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
230
+ / ^ a t (?: O b j e c t \. ) ? e v a l \( e v a l a t ( < a n o n y m o u s > | e x p o r t s .t e s t ) \( (?: .* [ / \\ ] ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) / ,
231
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
232
232
] ) ;
233
233
} ) ;
234
234
@@ -237,7 +237,7 @@ it('native function', function() {
237
237
'[1].map(function(x) { throw new Error(x); });'
238
238
] , [
239
239
'Error: 1' ,
240
- / \/ .o r i g i n a l \. j s / ,
240
+ / [ / \\ ] .o r i g i n a l \. j s / ,
241
241
/ a t A r r a y \. m a p \( n a t i v e \) /
242
242
] ) ;
243
243
} ) ;
@@ -255,7 +255,7 @@ it('throw with empty source map', function() {
255
255
'throw new Error("test");'
256
256
] , [
257
257
'Error: test' ,
258
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? .g e n e r a t e d .j s : 1 : 3 4 \) $ /
258
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? .g e n e r a t e d .j s : 1 : 3 4 \) $ /
259
259
] ) ;
260
260
} ) ;
261
261
@@ -266,11 +266,11 @@ it('throw in Timeout with empty source map', function(done) {
266
266
' throw new Error("this is the error")' ,
267
267
'})'
268
268
] , [
269
- / \/ .g e n e r a t e d .j s : 3 $ / ,
269
+ / [ / \\ ] .g e n e r a t e d .j s : 3 $ / ,
270
270
' throw new Error("this is the error")' ,
271
271
/ ^ \^ $ / ,
272
272
'Error: this is the error' ,
273
- / ^ a t ( ( n u l l ) | ( T i m e o u t ) ) \. _ o n T i m e o u t \( (?: .* \/ ) ? .g e n e r a t e d .j s : 3 : 1 1 \) $ /
273
+ / ^ a t ( ( n u l l ) | ( T i m e o u t ) ) \. _ o n T i m e o u t \( (?: .* [ / \\ ] ) ? .g e n e r a t e d .j s : 3 : 1 1 \) $ /
274
274
] ) ;
275
275
} ) ;
276
276
@@ -279,7 +279,7 @@ it('throw with source map with gap', function() {
279
279
'throw new Error("test");'
280
280
] , [
281
281
'Error: test' ,
282
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? .g e n e r a t e d .j s : 1 : 3 4 \) $ /
282
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? .g e n e r a t e d .j s : 1 : 3 4 \) $ /
283
283
] ) ;
284
284
} ) ;
285
285
@@ -288,7 +288,7 @@ it('sourcesContent with data URL', function() {
288
288
'throw new Error("test");'
289
289
] , [
290
290
'Error: test' ,
291
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? o r i g i n a l .j s : 1 0 0 1 : 5 \) $ /
291
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? o r i g i n a l .j s : 1 0 0 1 : 5 \) $ /
292
292
] ) ;
293
293
} ) ;
294
294
@@ -298,7 +298,7 @@ it('finds the last sourceMappingURL', function() {
298
298
'throw new Error("test");'
299
299
] , [
300
300
'Error: test' ,
301
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? o r i g i n a l .j s : 1 0 0 2 : 5 \) $ /
301
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? o r i g i n a l .j s : 1 0 0 2 : 5 \) $ /
302
302
] ) ;
303
303
} ) ;
304
304
@@ -310,11 +310,11 @@ it('default options', function(done) {
310
310
'process.nextTick(foo);' ,
311
311
'process.nextTick(function() { process.exit(1); });'
312
312
] , [
313
- / \/ .o r i g i n a l \. j s : 1 $ / ,
313
+ / [ / \\ ] .o r i g i n a l \. j s : 1 $ / ,
314
314
'this is the original code' ,
315
315
'^' ,
316
316
'Error: this is the error' ,
317
- / ^ a t f o o \( (?: .* \/ ) ? .o r i g i n a l \. j s : 1 : 1 \) $ /
317
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? .o r i g i n a l \. j s : 1 : 1 \) $ /
318
318
] ) ;
319
319
} ) ;
320
320
@@ -325,11 +325,11 @@ it('handleUncaughtExceptions is true', function(done) {
325
325
'require("./source-map-support").install({ handleUncaughtExceptions: true });' ,
326
326
'process.nextTick(foo);'
327
327
] , [
328
- / \/ .o r i g i n a l \. j s : 1 $ / ,
328
+ / [ / \\ ] .o r i g i n a l \. j s : 1 $ / ,
329
329
'this is the original code' ,
330
330
'^' ,
331
331
'Error: this is the error' ,
332
- / ^ a t f o o \( (?: .* \/ ) ? .o r i g i n a l \. j s : 1 : 1 \) $ /
332
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? .o r i g i n a l \. j s : 1 : 1 \) $ /
333
333
] ) ;
334
334
} ) ;
335
335
@@ -340,15 +340,15 @@ it('handleUncaughtExceptions is false', function(done) {
340
340
'require("./source-map-support").install({ handleUncaughtExceptions: false });' ,
341
341
'process.nextTick(foo);'
342
342
] , [
343
- / \/ .g e n e r a t e d .j s : 2 $ / ,
343
+ / [ / \\ ] .g e n e r a t e d .j s : 2 $ / ,
344
344
'function foo() { throw new Error("this is the error"); }' ,
345
345
346
346
// Before Node 4, the arrow points on the `new`, after on the
347
347
// `throw`.
348
348
/ ^ (?: ) ? \^ $ / ,
349
349
350
350
'Error: this is the error' ,
351
- / ^ a t f o o \( (?: .* \/ ) ? .o r i g i n a l \. j s : 1 : 1 \) $ /
351
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? .o r i g i n a l \. j s : 1 : 1 \) $ /
352
352
] ) ;
353
353
} ) ;
354
354
@@ -359,11 +359,11 @@ it('default options with empty source map', function(done) {
359
359
'require("./source-map-support").install();' ,
360
360
'process.nextTick(foo);'
361
361
] , [
362
- / \/ .g e n e r a t e d .j s : 2 $ / ,
362
+ / [ / \\ ] .g e n e r a t e d .j s : 2 $ / ,
363
363
'function foo() { throw new Error("this is the error"); }' ,
364
364
/ ^ (?: ) ? \^ $ / ,
365
365
'Error: this is the error' ,
366
- / ^ a t f o o \( (?: .* \/ ) ? .g e n e r a t e d .j s : 2 : 2 4 \) $ /
366
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? .g e n e r a t e d .j s : 2 : 2 4 \) $ /
367
367
] ) ;
368
368
} ) ;
369
369
@@ -374,11 +374,11 @@ it('default options with source map with gap', function(done) {
374
374
'require("./source-map-support").install();' ,
375
375
'process.nextTick(foo);'
376
376
] , [
377
- / \/ .g e n e r a t e d .j s : 2 $ / ,
377
+ / [ / \\ ] .g e n e r a t e d .j s : 2 $ / ,
378
378
'function foo() { throw new Error("this is the error"); }' ,
379
379
/ ^ (?: ) ? \^ $ / ,
380
380
'Error: this is the error' ,
381
- / ^ a t f o o \( (?: .* \/ ) ? .g e n e r a t e d .j s : 2 : 2 4 \) $ /
381
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? .g e n e r a t e d .j s : 2 : 2 4 \) $ /
382
382
] ) ;
383
383
} ) ;
384
384
@@ -391,7 +391,7 @@ it('specifically requested error source', function(done) {
391
391
'process.on("uncaughtException", function (e) { console.log("SRC:" + sms.getErrorSource(e)); });' ,
392
392
'process.nextTick(foo);'
393
393
] , [
394
- / ^ S R C : .* \/ .o r i g i n a l .j s : 1 $ / ,
394
+ / ^ S R C : .* [ / \\ ] .o r i g i n a l .j s : 1 $ / ,
395
395
'this is the original code' ,
396
396
'^'
397
397
] ) ;
@@ -405,11 +405,11 @@ it('sourcesContent', function(done) {
405
405
'process.nextTick(foo);' ,
406
406
'process.nextTick(function() { process.exit(1); });'
407
407
] , [
408
- / \/ o r i g i n a l \. j s : 1 0 0 2 $ / ,
408
+ / [ / \\ ] o r i g i n a l \. j s : 1 0 0 2 $ / ,
409
409
' line 2' ,
410
410
' ^' ,
411
411
'Error: this is the error' ,
412
- / ^ a t f o o \( (?: .* \/ ) ? o r i g i n a l \. j s : 1 0 0 2 : 5 \) $ /
412
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? o r i g i n a l \. j s : 1 0 0 2 : 5 \) $ /
413
413
] ) ;
414
414
} ) ;
415
415
@@ -432,9 +432,9 @@ it('missing source maps should also be cached', function(done) {
432
432
'process.nextTick(function() { console.log(count); });' ,
433
433
] , [
434
434
'Error: this is the error' ,
435
- / ^ a t f o o \( (?: .* \/ ) ? .g e n e r a t e d .j s : 4 : 1 5 \) $ / ,
435
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? .g e n e r a t e d .j s : 4 : 1 5 \) $ / ,
436
436
'Error: this is the error' ,
437
- / ^ a t f o o \( (?: .* \/ ) ? .g e n e r a t e d .j s : 4 : 1 5 \) $ / ,
437
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? .g e n e r a t e d .j s : 4 : 1 5 \) $ / ,
438
438
'1' , // The retrieval should only be attempted once
439
439
] ) ;
440
440
} ) ;
@@ -465,9 +465,9 @@ it('should consult all retrieve source map providers', function(done) {
465
465
'process.nextTick(function() { console.log(count); });' ,
466
466
] , [
467
467
'Error: this is the error' ,
468
- / ^ a t f o o \( (?: .* \/ ) ? o r i g i n a l .j s : 1 0 0 4 : 5 \) $ / ,
468
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? o r i g i n a l .j s : 1 0 0 4 : 5 \) $ / ,
469
469
'Error: this is the error' ,
470
- / ^ a t f o o \( (?: .* \/ ) ? o r i g i n a l .j s : 1 0 0 4 : 5 \) $ / ,
470
+ / ^ a t f o o \( (?: .* [ / \\ ] ) ? o r i g i n a l .j s : 1 0 0 4 : 5 \) $ / ,
471
471
'1' , // The retrieval should only be attempted once
472
472
] ) ;
473
473
} ) ;
@@ -502,9 +502,9 @@ it('should allow for runtime inline source maps', function(done) {
502
502
'require("./.generated.jss");' ,
503
503
] , [
504
504
'Error: this is the error' ,
505
- / ^ a t f o o \( .* \/ o r i g i n a l .j s : 1 0 0 4 : 5 \) $ / ,
505
+ / ^ a t f o o \( .* [ / \\ ] o r i g i n a l .j s : 1 0 0 4 : 5 \) $ / ,
506
506
'Error: this is the error' ,
507
- / ^ a t f o o \( .* \/ o r i g i n a l .j s : 1 0 0 4 : 5 \) $ / ,
507
+ / ^ a t f o o \( .* [ / \\ ] o r i g i n a l .j s : 1 0 0 4 : 5 \) $ / ,
508
508
'0' , // The retrieval should only be attempted once
509
509
] ) ;
510
510
} ) ;
@@ -518,7 +518,7 @@ it('finds source maps with charset specified', function() {
518
518
var source = [ 'throw new Error("test");' ] ;
519
519
var expected = [
520
520
'Error: test' ,
521
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
521
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
522
522
] ;
523
523
524
524
fs . writeFileSync ( '.generated.js' , 'exports.test = function() {' +
@@ -528,7 +528,7 @@ it('finds source maps with charset specified', function() {
528
528
delete require . cache [ require . resolve ( './.generated' ) ] ;
529
529
require ( './.generated' ) . test ( ) ;
530
530
} catch ( e ) {
531
- compareLines ( e . stack . split ( '\n' ) , expected ) ;
531
+ compareLines ( e . stack . split ( / \r \n | \n / ) , expected ) ;
532
532
}
533
533
fs . unlinkSync ( '.generated.js' ) ;
534
534
} ) ;
@@ -542,7 +542,7 @@ it('allows code/comments after sourceMappingURL', function() {
542
542
var source = [ 'throw new Error("test");' ] ;
543
543
var expected = [
544
544
'Error: test' ,
545
- / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* \/ ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
545
+ / ^ a t O b j e c t \. e x p o r t s \. t e s t \( (?: .* [ / \\ ] ) ? l i n e 1 \. j s : 1 0 0 1 : 1 0 1 \) $ /
546
546
] ;
547
547
548
548
fs . writeFileSync ( '.generated.js' , 'exports.test = function() {' +
@@ -553,7 +553,7 @@ it('allows code/comments after sourceMappingURL', function() {
553
553
delete require . cache [ require . resolve ( './.generated' ) ] ;
554
554
require ( './.generated' ) . test ( ) ;
555
555
} catch ( e ) {
556
- compareLines ( e . stack . split ( '\n' ) , expected ) ;
556
+ compareLines ( e . stack . split ( / \r \n | \n / ) , expected ) ;
557
557
}
558
558
fs . unlinkSync ( '.generated.js' ) ;
559
559
} ) ;
0 commit comments