File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function routes(server) {
22
22
createReadStream ( join ( clientBasePath , 'default/index.bundle.js' ) ) . pipe ( res ) ;
23
23
} ) ;
24
24
25
- app . get ( '/invalidate' , ( _req , res ) => {
25
+ app . get ( '/webpack-dev-server/ invalidate' , ( _req , res ) => {
26
26
server . invalidate ( ) ;
27
27
res . end ( ) ;
28
28
} ) ;
Original file line number Diff line number Diff line change @@ -48,8 +48,12 @@ describe('routes util', () => {
48
48
} ) ;
49
49
} ) ;
50
50
51
- it ( 'GET request to invalidate endpoint' , ( done ) => {
52
- req . get ( '/invalidate' ) . expect ( 200 , done ) ;
51
+ it ( 'should handles GET request to invalidate endpoint' , ( done ) => {
52
+ req . get ( '/webpack-dev-server/invalidate' ) . then ( ( { res } ) => {
53
+ expect ( res . headers [ 'content-type' ] ) . not . toEqual ( 'text/html' ) ;
54
+ expect ( res . statusCode ) . toEqual ( 200 ) ;
55
+ done ( ) ;
56
+ } ) ;
53
57
} ) ;
54
58
55
59
it ( 'should handles GET request to live html' , ( done ) => {
You can’t perform that action at this time.
0 commit comments