- Testing e2e on Circle CI

This commit is contained in:
Ferdi Koomen 2020-09-25 16:57:26 +02:00
parent 6e6d273971
commit 35dbe75b2f
3 changed files with 12 additions and 4 deletions

View File

@ -3,7 +3,7 @@ jobs:
build:
working_directory: ~/repo
docker:
- image: circleci/node:lts
- image: circleci/node:latest-browsers
steps:
- checkout
- restore_cache:
@ -23,6 +23,9 @@ jobs:
- run:
name: test
command: yarn run test:coverage
- run:
name: e2e
command: yarn run test:e2e
- run:
name: codecov
command: yarn run codecov

View File

@ -17,10 +17,10 @@ module.exports = {
testMatch: [
'<rootDir>/test/e2e/v2.fetch.spec.js',
'<rootDir>/test/e2e/v2.xhr.spec.js',
'<rootDir>/test/e2e/v2.node.spec.js',
// '<rootDir>/test/e2e/v2.node.spec.js',
'<rootDir>/test/e2e/v3.fetch.spec.js',
'<rootDir>/test/e2e/v3.xhr.spec.js',
'<rootDir>/test/e2e/v3.node.spec.js',
// '<rootDir>/test/e2e/v3.node.spec.js',
],
},
],

View File

@ -9,7 +9,12 @@ async function start() {
// This starts the a new puppeteer browser (Chrome)
// and load the localhost page, this page will load the
// javascript modules (see server.js for more info)
browser = await puppeteer.launch();
browser = await puppeteer.launch({
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
]
});
page = await browser.newPage();
await page.goto(`http://localhost:3000/`, {
waitUntil: 'networkidle0',