File tree Expand file tree Collapse file tree 3 files changed +47
-11
lines changed
test/manual/webpack-domain Expand file tree Collapse file tree 3 files changed +47
-11
lines changed Original file line number Diff line number Diff line change 60
60
"test:jest" : " jest" ,
61
61
"test:watch" : " jest --watch" ,
62
62
"test:express" : " node test/manual/express-scope-separation/start.js" ,
63
- "test:webpack" : " cd test/manual/webpack-domain/ && yarn && yarn webpack && node dist/bundle .js" ,
63
+ "test:webpack" : " cd test/manual/webpack-domain/ && yarn && node npm-build .js" ,
64
64
"version" : " node ../../scripts/versionbump.js src/version.ts"
65
65
},
66
66
"jest" : {
Original file line number Diff line number Diff line change
1
+ const path = require ( 'path' ) ;
2
+ const webpack = require ( 'webpack' ) ;
3
+ const { execSync } = require ( 'child_process' ) ;
4
+
5
+ webpack (
6
+ {
7
+ entry : './index.js' ,
8
+ output : {
9
+ path : path . resolve ( __dirname , 'dist' ) ,
10
+ filename : 'bundle.js' ,
11
+ } ,
12
+ target : 'node' ,
13
+ mode : 'development' ,
14
+ } ,
15
+ ( err , stats ) => {
16
+ if ( err ) {
17
+ console . error ( err . stack || err ) ;
18
+ if ( err . details ) {
19
+ console . error ( err . details ) ;
20
+ }
21
+ return ;
22
+ }
23
+
24
+ const info = stats . toJson ( ) ;
25
+
26
+ if ( stats . hasErrors ( ) ) {
27
+ console . error ( info . errors ) ;
28
+ process . exit ( 1 ) ;
29
+ }
30
+
31
+ if ( stats . hasWarnings ( ) ) {
32
+ console . warn ( info . warnings ) ;
33
+ process . exit ( 1 ) ;
34
+ }
35
+
36
+ runTests ( ) ;
37
+ } ,
38
+ ) ;
39
+
40
+ function runTests ( ) {
41
+ try {
42
+ execSync ( `node ${ path . resolve ( __dirname , 'dist' , 'bundle.js' ) } ` ) ;
43
+ } catch ( _ ) {
44
+ process . exit ( 1 ) ;
45
+ }
46
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments