-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9297988
commit 61d0cdf
Showing
6 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use strict'; | ||
|
||
const testServer = require('./helpers/test-server'); | ||
const config = require('./fixtures/simple-config/webpack.config'); | ||
|
||
describe('Before And After options', () => { | ||
let onListeningIsRunning = false; | ||
|
||
beforeAll((done) => { | ||
testServer.start( | ||
config, | ||
{ | ||
onListening: (devServer) => { | ||
if (!devServer) { | ||
throw new Error('webpack-dev-server is not defined'); | ||
} | ||
|
||
onListeningIsRunning = true; | ||
}, | ||
}, | ||
done | ||
); | ||
}); | ||
|
||
afterAll(testServer.close); | ||
|
||
it('should handle before route', () => { | ||
expect(onListeningIsRunning).toBe(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters