mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
Test with phantomjs 2.1 and mocha-phantomjs-core
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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`
|
||||
|
||||
38
package.json
38
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"
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
<script src="../node_modules/happen/src/happen.js"></script>
|
||||
<script src="lib/bind-shim.js"></script>
|
||||
|
||||
<script>
|
||||
if (typeof initMochaPhantomJS === 'function') {
|
||||
initMochaPhantomJS()
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- include source files here... -->
|
||||
<script src='../js/lib/lodash.js'></script>
|
||||
<script src='../js/lib/d3.v3.js'></script>
|
||||
@@ -323,7 +329,7 @@
|
||||
|
||||
<script>
|
||||
iD.data.load('../', function() {
|
||||
(window.mochaPhantomJS || window.mocha).run();
|
||||
window.mocha.run();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
<script src="../node_modules/happen/src/happen.js"></script>
|
||||
<script src="lib/bind-shim.js"></script>
|
||||
|
||||
<script>
|
||||
if (typeof initMochaPhantomJS === 'function') {
|
||||
initMochaPhantomJS()
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- include source files here... -->
|
||||
<script src='../dist/iD.js'></script>
|
||||
<script src='../dist/presets.js'></script>
|
||||
@@ -120,7 +126,7 @@
|
||||
<script src="spec/id.js"></script>
|
||||
|
||||
<script>
|
||||
(window.mochaPhantomJS || window.mocha).run();
|
||||
window.mocha.run();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user