@@ -6,27 +6,28 @@ import config from "./rollup.config"
6
6
7
7
test ( "can be bundled using rollup" , async t => {
8
8
t . timeout ( 2000000 ) ; // milliseconds
9
- const [ appBundle , workerBundle ] = await Promise . all ( [
10
- rollup ( {
11
- input : path . resolve ( __dirname , "app.js" ) ,
12
- ...config
13
- } ) ,
14
- rollup ( {
15
- input : path . resolve ( __dirname , "worker.js" ) ,
16
- ...config
17
- } )
18
- ] )
19
-
20
- await Promise . all ( [
21
- appBundle . write ( {
22
- dir : path . resolve ( __dirname , "dist" ) ,
23
- format : "iife"
24
- } ) ,
25
- workerBundle . write ( {
26
- dir : path . resolve ( __dirname , "dist" ) ,
27
- format : "iife"
28
- } )
29
- ] )
9
+
10
+ const appBundleP = rollup ( {
11
+ input : path . resolve ( __dirname , "app.js" ) ,
12
+ ...config
13
+ } )
14
+
15
+ const workerBundleP = rollup ( {
16
+ input : path . resolve ( __dirname , "worker.js" ) ,
17
+ ...config
18
+ } )
19
+
20
+ const appBundleWriteP = ( await appBundleP ) . write ( {
21
+ dir : path . resolve ( __dirname , "dist" ) ,
22
+ format : "iife"
23
+ } )
24
+
25
+ const workerBundleWriteP = ( await workerBundleP ) . write ( {
26
+ dir : path . resolve ( __dirname , "dist" ) ,
27
+ format : "iife"
28
+ } )
29
+
30
+ await Promise . all ( [ appBundleWriteP , workerBundleWriteP ] )
30
31
31
32
if ( process . platform === "win32" ) {
32
33
// Quick-fix for weird Windows issue in CI
0 commit comments