@@ -1109,8 +1109,8 @@ describe('javascript', function () {
1109
1109
let main = await outputFS . readFile ( b . getBundles ( ) [ 0 ] . filePath , 'utf8' ) ;
1110
1110
dedicated = await outputFS . readFile ( dedicated . filePath , 'utf8' ) ;
1111
1111
shared = await outputFS . readFile ( shared . filePath , 'utf8' ) ;
1112
- assert ( / n e w W o r k e r ( .* ?, { [ \n \s ] + t y p e : " m o d u l e " [ \n \s ] + } ) / . test ( main ) ) ;
1113
- assert ( / n e w S h a r e d W o r k e r ( .* ?, { [ \n \s ] + t y p e : " m o d u l e " [ \n \s ] + } ) / . test ( main ) ) ;
1112
+ assert ( / n e w W o r k e r ( .* ?, { [ \n \s ] + t y p e : ' m o d u l e ' [ \n \s ] + } ) / . test ( main ) ) ;
1113
+ assert ( / n e w S h a r e d W o r k e r ( .* ?, { [ \n \s ] + t y p e : ' m o d u l e ' [ \n \s ] + } ) / . test ( main ) ) ;
1114
1114
} ) ;
1115
1115
1116
1116
for ( let shouldScopeHoist of [ true , false ] ) {
@@ -1263,8 +1263,8 @@ describe('javascript', function () {
1263
1263
) ;
1264
1264
1265
1265
let main = await outputFS . readFile ( b . getBundles ( ) [ 0 ] . filePath , 'utf8' ) ;
1266
- assert ( / n e w W o r k e r ( .* ?, { [ \n \s ] + n a m e : " w o r k e r " [ \n \s ] + } ) / . test ( main ) ) ;
1267
- assert ( / n e w S h a r e d W o r k e r ( .* ?, { [ \n \s ] + n a m e : " s h a r e d " [ \n \s ] + } ) / . test ( main ) ) ;
1266
+ assert ( / n e w W o r k e r ( .* ?, { [ \n \s ] + n a m e : ' w o r k e r ' [ \n \s ] + } ) / . test ( main ) ) ;
1267
+ assert ( / n e w S h a r e d W o r k e r ( .* ?, { [ \n \s ] + n a m e : ' s h a r e d ' [ \n \s ] + } ) / . test ( main ) ) ;
1268
1268
} ) ;
1269
1269
1270
1270
it ( 'should error if importing in a worker without type: module' , async function ( ) {
@@ -1463,7 +1463,7 @@ describe('javascript', function () {
1463
1463
] ) ;
1464
1464
1465
1465
let res = await outputFS . readFile ( b . getBundles ( ) [ 0 ] . filePath , 'utf8' ) ;
1466
- assert ( res . includes ( `importScripts(" imported.js" )` ) ) ;
1466
+ assert ( res . includes ( `importScripts(' imported.js' )` ) ) ;
1467
1467
} ) ;
1468
1468
1469
1469
it ( 'should ignore importScripts in script workers when not passed a string literal' , async function ( ) {
@@ -1509,7 +1509,7 @@ describe('javascript', function () {
1509
1509
] ) ;
1510
1510
1511
1511
let res = await outputFS . readFile ( b . getBundles ( ) [ 1 ] . filePath , 'utf8' ) ;
1512
- assert ( res . includes ( `importScripts(" https://unpkg.com/parcel" )` ) ) ;
1512
+ assert ( res . includes ( `importScripts(' https://unpkg.com/parcel' )` ) ) ;
1513
1513
} ) ;
1514
1514
1515
1515
it ( 'should support bundling service-workers' , async function ( ) {
@@ -1584,7 +1584,7 @@ describe('javascript', function () {
1584
1584
let main = bundles . find ( b => ! b . env . isWorker ( ) ) ;
1585
1585
let mainContents = await outputFS . readFile ( main . filePath , 'utf8' ) ;
1586
1586
assert (
1587
- / n a v i g a t o r .s e r v i c e W o r k e r .r e g i s t e r \( .* ?, { [ \n \s ] * s c o p e : " f o o " [ \n \s ] * } \) / . test (
1587
+ / n a v i g a t o r .s e r v i c e W o r k e r .r e g i s t e r \( .* ?, { [ \n \s ] * s c o p e : ' f o o ' [ \n \s ] * } \) / . test (
1588
1588
mainContents ,
1589
1589
) ,
1590
1590
) ;
@@ -4386,7 +4386,7 @@ describe('javascript', function () {
4386
4386
let res = await run ( b ) ;
4387
4387
assert . equal (
4388
4388
res . default ,
4389
- `<p>test</p>\n<script>console.log("hi" );\n\n</script>\n` ,
4389
+ `<p>test</p>\n<script>console.log('hi' );\n\n</script>\n` ,
4390
4390
) ;
4391
4391
} ) ;
4392
4392
@@ -5238,6 +5238,14 @@ describe('javascript', function () {
5238
5238
assert . deepEqual ( res , { ns : { a : 4 , default : 1 } } ) ;
5239
5239
} ) ;
5240
5240
5241
+ it ( 'should support export declarations with destructuring' , async function ( ) {
5242
+ let b = await bundle (
5243
+ path . join ( __dirname , 'integration/js-export-destructuring/index.js' ) ,
5244
+ ) ;
5245
+ let res = await run ( b ) ;
5246
+ assert . deepEqual ( res , { foo : 1 , bar : 2 } ) ;
5247
+ } ) ;
5248
+
5241
5249
it ( 'should support export default declarations' , async function ( ) {
5242
5250
let b = await bundle (
5243
5251
path . join ( __dirname , 'integration/js-export-default/index.js' ) ,
0 commit comments