Skip to content

Commit

Permalink
Merge pull request #1629 from sinonjs/headless-chrome
Browse files Browse the repository at this point in the history
Upgrade to Mochify 5 to run tests in Headless Chrome
  • Loading branch information
mantoni authored Dec 18, 2017
2 parents bde5b51 + b51d5b9 commit 78a8986
Show file tree
Hide file tree
Showing 6 changed files with 199 additions and 847 deletions.
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ jobs:
name: Install dependencies
command: |
npm config set strict-ssl false
# Avoid downloading chromium unnecessarily
npm config set ignore-scripts true
npm install
npm config set ignore-scripts false
- run:
name: Pre-Test
# ESLint only supports Node >=4
command: |
if [[ ! "$(node --version)" =~ ^v4 ]]; then
NODE_VERSION=$(node --version)
if [[ ${NODE_VERSION:0:3} == "v6." ]]; then
npm run lint;
npm run test-headless;
npm run test-webworker;
fi
- run:
name: Test
Expand Down
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ env:
before_install:
- npm config set strict-ssl false
- npm install coveralls
# Prevent mochify -> puppeteer install script to run unnecessarily
- if [ "x$TRAVIS_NODE_VERSION" != "x8" ]; then npm config set ignore-scripts true; fi

before_script:
# Make npm run work for the script phase:
- if [ "x$TRAVIS_NODE_VERSION" != "x8" ]; then npm config set ignore-scripts false; fi
# these build targets only need to run once per build, so let's conserve a few resources
# ESLint only supports Node >=4
- if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run lint; fi
Expand All @@ -33,8 +37,7 @@ script:
- npm run test-node

after_success:
- npm run test-coverage
- cat ./coverage/lcov.info | coveralls lib
- if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run test-coverage && cat ./coverage/lcov.info | coveralls lib; fi

git:
depth: 10
Loading

0 comments on commit 78a8986

Please sign in to comment.