From 35dbe75b2fd493fce1e59c734fa3e19667b9e57d Mon Sep 17 00:00:00 2001 From: Ferdi Koomen Date: Fri, 25 Sep 2020 16:57:26 +0200 Subject: [PATCH] - Testing e2e on Circle CI --- .circleci/config.yml | 5 ++++- jest.config.js | 4 ++-- test/e2e/scripts/browser.js | 7 ++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b3ad2141..4955a4c7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/jest.config.js b/jest.config.js index b2f5c0c2..b8a467c6 100644 --- a/jest.config.js +++ b/jest.config.js @@ -17,10 +17,10 @@ module.exports = { testMatch: [ '/test/e2e/v2.fetch.spec.js', '/test/e2e/v2.xhr.spec.js', - '/test/e2e/v2.node.spec.js', + // '/test/e2e/v2.node.spec.js', '/test/e2e/v3.fetch.spec.js', '/test/e2e/v3.xhr.spec.js', - '/test/e2e/v3.node.spec.js', + // '/test/e2e/v3.node.spec.js', ], }, ], diff --git a/test/e2e/scripts/browser.js b/test/e2e/scripts/browser.js index bc7eff60..61d773f6 100644 --- a/test/e2e/scripts/browser.js +++ b/test/e2e/scripts/browser.js @@ -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',