File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ const sander = require('sander');
9
9
10
10
const plugin = require ( '..' ) ;
11
11
12
+ // TODO(lukeed) do this within uvu?
13
+ const normalize = file => fs . readFileSync ( file , 'utf8' ) . replace ( / \r ? \n / g, '\n' ) ;
14
+
12
15
test ( 'resolves using pkg.svelte' , ( ) => {
13
16
const { resolveId } = plugin ( ) ;
14
17
assert . is (
@@ -305,8 +308,8 @@ test('bundles CSS deterministically', async () => {
305
308
} ) ;
306
309
307
310
assert . fixture (
308
- fs . readFileSync ( 'test/deterministic-css/dist/bundle.css' , 'utf-8 ') ,
309
- fs . readFileSync ( 'test/deterministic-css/expected/bundle.css' , 'utf-8 ')
311
+ normalize ( 'test/deterministic-css/dist/bundle.css' ) ,
312
+ normalize ( 'test/deterministic-css/expected/bundle.css' )
310
313
) ;
311
314
} ) ;
312
315
@@ -346,8 +349,8 @@ test('handles filenames that happen to contain .svelte', async () => {
346
349
}
347
350
348
351
assert . fixture (
349
- fs . readFileSync ( 'test/filename-test/dist/bundle.css' , 'utf-8 ') ,
350
- fs . readFileSync ( 'test/filename-test/expected/bundle.css' , 'utf-8 ')
352
+ normalize ( 'test/filename-test/dist/bundle.css' ) ,
353
+ normalize ( 'test/filename-test/expected/bundle.css' )
351
354
) ;
352
355
} ) ;
353
356
You can’t perform that action at this time.
0 commit comments