Skip to content

Commit

Permalink
Use jest-puppeteer
Browse files Browse the repository at this point in the history
Why? Globals like __BROWSER__ are not available since Jest v24
  • Loading branch information
colinrotherham committed Apr 17, 2019
1 parent 000e509 commit 6d48e3d
Show file tree
Hide file tree
Showing 45 changed files with 608 additions and 250 deletions.
20 changes: 20 additions & 0 deletions jest-puppeteer.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const configPaths = require('./config/paths.json')
const PORT = process.env.PORT || configPaths.ports.test

module.exports = {
browserContext: 'incognito',
launch: {
// we use --no-sandbox --disable-setuid-sandbox as a workaround for the
// 'No usable sandbox! Update your kernel' error
// see more https://github.com/Googlechrome/puppeteer/issues/290
args: [
'--no-sandbox',
'--disable-setuid-sandbox'
]
},
server: {
command: `PORT=${PORT} node app/start.js`,
launchTimeout: 30000, // Allow time for application to start
port: PORT
}
}
33 changes: 0 additions & 33 deletions lib/puppeteer/environment.js

This file was deleted.

37 changes: 0 additions & 37 deletions lib/puppeteer/setup.js

This file was deleted.

14 changes: 0 additions & 14 deletions lib/puppeteer/teardown.js

This file was deleted.

Loading

0 comments on commit 6d48e3d

Please sign in to comment.