Skip to content

Commit

Permalink
Update jest-playwright configs to correct some bugs with Playwright t…
Browse files Browse the repository at this point in the history
…esting
  • Loading branch information
humphd committed Apr 13, 2021
1 parent 04a5e8d commit b06165a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
'plugin:promise/recommended',
'plugin:react-hooks/recommended',
'plugin:import/typescript',
'plugin:jest-playwright/recommended',
],
plugins: ['prettier', 'promise', 'react', 'react-hooks', 'jest'],
settings: {
Expand Down
4 changes: 4 additions & 0 deletions jest-playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// seen to know how to find it if I put it there. It has to be at the root.
module.exports = {
launchOptions: {
// NOTE: if you need to debug, change these so you can see the browsers running
// and slow them down, so there is time to read error messages:
// headless: false,
// slowMo: 1000,
headless: true,
},
browsers: ['chromium', 'firefox', 'webkit'],
Expand Down
3 changes: 1 addition & 2 deletions jest.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ require('dotenv').config({ path: path.join(__dirname, './config/env.development'

// A base config for all our Jest test projects to use
module.exports = {
testEnvironment: 'node',
verbose: true,
coverageDirectory: '<rootDir>/coverage',
moduleDirectories: ['node_modules'],
automock: false,
testTimeout: 30000,
testTimeout: 10000,
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jest-playwright": "0.2.1",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-prettier": "3.3.1",
"eslint-plugin-promise": "4.3.1",
Expand Down
2 changes: 1 addition & 1 deletion src/api/auth/jest-playwright.config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Due to https://github.com/playwright-community/jest-playwright/issues/446
// we put our jest-playwright config in the Telescope root, see ./jest-playwright.confing.js
// we put our jest-playwright config in the Telescope root, see ./jest-playwright.config.js

0 comments on commit b06165a

Please sign in to comment.