Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix browser test in CI #10

Merged
merged 12 commits into from
Oct 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:6.11.3
- image: circleci/node:6.11.4-browsers
environment:
CHROME_BIN: "/usr/bin/google-chrome"
steps:
- checkout
#- run:
# name: update-npm
# command: 'sudo npm install -g npm@latest'
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
Expand All @@ -28,10 +27,6 @@ jobs:
- run:
name: build
command: npm run build
- run:
name: module-versions
command: |
./node_modules/mocha-phantomjs/bin/mocha-phantomjs --version
- run:
name: test-node
command: npm run test-node
Expand All @@ -40,7 +35,7 @@ jobs:
MOCHA_FILE: junit/test-results.xml
- run:
name: test-browser
command: npm run test-browser || true
command: npm run test-browser
- run:
name: lint
command: npm run lint
Expand All @@ -59,4 +54,4 @@ jobs:
path: coverage
prefix: coverage
- store_test_results:
path: coverage/coverage.json
path: coverage/coverage.json
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ BROWSERIFY ?= browserify
MINIFY ?= minify
REPORTER ?= spec
MOCHA ?= mocha
MOCHA_PHANTOMJS ?= mocha-phantomjs
MOCHA_HEADLESS_CHROME ?= node_modules/mocha-headless-chrome/bin/start
#FILTER ?= .+
BROWSERIFIED ?= dist/opentmi-client.js
MINIFIED ?= dist/opentmi-client.min.js
Expand Down Expand Up @@ -35,7 +35,7 @@ ${BROWSER_TEST} : $(shell ${BROWSERIFY} --list ${TESTS})


test-browser: bower-install ${BROWSER_TEST}
${MOCHA_PHANTOMJS} -p node_modules/phantomjs/bin/phantomjs -R ${REPORTER} -g '${FILTER}' test/index.html
${MOCHA_HEADLESS_CHROME} -f test/index.html

test-node:
NODE_ENV=test ${MOCHA} --reporter $(REPORTER) --recursive -g '${FILTER}'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"debug": "^3.1.0",
"invariant": "^2.2.2",
"lodash": "^4.17.4",
"mocha-junit-reporter": "^1.14.0",
"socket.io-client": "^2.0.3"
},
"devDependencies": {
Expand All @@ -53,7 +52,8 @@
"istanbul": "^0.4.3",
"jsdoc": "^3.5.5",
"mocha": "^4.0.1",
"mocha-phantomjs": "^4.1.0",
"mocha-headless-chrome": "^1.5.3",
"mocha-junit-reporter": "^1.14.0",
"moxios": "^0.4.0",
"sinon": "^4.0.1",
"socket.io": "^2.0.3",
Expand Down