diff --git a/.travis.yml b/.travis.yml
index 24cd4c307..84119dd8d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,9 @@
language: node_js
sudo: false
+before_install:
+ # https://github.com/travis-ci/travis-ci/issues/3225
+ - mkdir travis-phantomjs
+ - wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
+ - tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs
+ - export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
before_script: make
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7d4225fe6..6a452ccb2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -155,6 +155,9 @@ feel free to use newer features wisely.
Test your code and make sure it passes.
+First ensure you have a `phantomjs` binary, version 2.0 or later, available on your `$PATH`. On a Mac,
+you can install this via homebrew with `brew install phantomjs`. Then:
+
1. Go to the directory where you have checked out `iD`
2. run `npm install`
3. run `make`
diff --git a/package.json b/package.json
index 5db17e9b5..c2efee119 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
"test": "test"
},
"scripts": {
- "test": "eslint js/id && mocha-phantomjs test/index.html --ssl-protocol=tlsv1 && make && mocha-phantomjs test/index_packaged.html --ssl-protocol=tlsv1"
+ "test": "eslint js/id && phantomjs node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/index.html dot && make && phantomjs node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/index_packaged.html dot"
},
"repository": {
"type": "git",
@@ -20,28 +20,28 @@
],
"license": "ISC",
"devDependencies": {
- "d3": "3.5.5",
- "smash": "0.0",
- "lodash-cli": "3.9.3",
- "uglify-js": "~2.4.16",
- "maki": "0.5.0",
- "eslint": "~1.10.3",
- "mocha": "~2.3.4",
- "mocha-phantomjs": "~4.0.2",
"chai": "~1.9.2",
+ "d3": "3.5.5",
+ "editor-imagery-index": "git://github.com/osmlab/editor-imagery-index.git#gh-pages",
+ "eslint": "~1.10.3",
+ "glob": "~3.1.21",
+ "happen": "0.1.2",
+ "js-yaml": "~3.3.1",
+ "jsonschema": "~0.3.2",
+ "lodash-cli": "3.9.3",
+ "maki": "0.5.0",
+ "minimist": "~1.2.0",
+ "mocha": "~2.3.4",
+ "mocha-phantomjs-core": "^1.3.0",
+ "name-suggestion-index": "0.1.1",
+ "request": "~2.16.2",
"sinon": "~1.6",
"sinon-chai": "~2.3.1",
- "happen": "0.1.2",
- "glob": "~3.1.21",
- "js-yaml": "~3.3.1",
- "request": "~2.16.2",
- "jsonschema": "~0.3.2",
- "editor-imagery-index": "git://github.com/osmlab/editor-imagery-index.git#gh-pages",
- "name-suggestion-index": "0.1.1",
- "minimist": "~1.2.0",
+ "smash": "0.0",
+ "svg-sprite": "1.2.19",
+ "uglify-js": "~2.4.16",
"xml2js": "~0.4.13",
- "xmlbuilder": "~4.2.0",
- "svg-sprite": "1.2.19"
+ "xmlbuilder": "~4.2.0"
},
"engines": {
"node": ">=0.10.0"
diff --git a/test/index.html b/test/index.html
index 1de031b1b..890fbef0e 100644
--- a/test/index.html
+++ b/test/index.html
@@ -16,6 +16,12 @@
+
+
@@ -323,7 +329,7 @@