forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [x] Move jest config from npm scripts to `jest.config.js` - [x] Remove obsolete cross-env package (we don't need it anymore 🎉) - [x] Fix bug where tests are not waiting for webdriver to be ready.
- Loading branch information
1 parent
d4785eb
commit 95a6a87
Showing
6 changed files
with
30 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict' | ||
|
||
module.exports = { | ||
testMatch: ['**/*.test.js'], | ||
verbose: true, | ||
bail: true, | ||
testEnvironment: 'node', | ||
rootDir: 'test', | ||
modulePaths: ['<rootDir>/lib'], | ||
globalSetup: '<rootDir>/jest-global-setup.js', | ||
globalTeardown: '<rootDir>/jest-global-teardown.js' | ||
} |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,14 @@ | ||
'use strict' | ||
|
||
const chromedriver = require('chromedriver') | ||
const waitPort = require('wait-port') | ||
|
||
module.exports = async function globalSetup () { | ||
chromedriver.start() | ||
|
||
// https://github.com/giggio/node-chromedriver/issues/117 | ||
await waitPort({ | ||
port: 9515, | ||
timeout: 1000 * 60 * 2 // 2 Minutes | ||
}) | ||
} |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
'use strict' | ||
|
||
const chromedriver = require('chromedriver') | ||
|
||
module.exports = async function globalSetup () { | ||
|