tests: add jest for testing Adds Jest for testing. Right now it runs in parallel to our old test setup.
The idea is that we can use the faster, simpler testing for all new stuff and all refactored elements. To run jest, simply run: `npm run jest` PR: #815 PR-URL: https://github.com/apache/couchdb-fauxton/pull/815 Reviewed-By: garren smith <garren.sm...@gmail.com> Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/de6f4341 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/de6f4341 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/de6f4341 Branch: refs/heads/master Commit: de6f43413b6db9e62ffd8746ca9a7333ceddd2f2 Parents: 14224ea Author: Robert Kowalski <robertkowal...@apache.org> Authored: Tue Nov 29 18:30:01 2016 +0100 Committer: Robert Kowalski <robertkowal...@apache.org> Committed: Wed Nov 30 18:31:37 2016 +0100 ---------------------------------------------------------------------- jest-config.json | 3 +++ package.json | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/de6f4341/jest-config.json ---------------------------------------------------------------------- diff --git a/jest-config.json b/jest-config.json new file mode 100644 index 0000000..3321768 --- /dev/null +++ b/jest-config.json @@ -0,0 +1,3 @@ +{ + "testPathDirs": ["app"] +} http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/de6f4341/package.json ---------------------------------------------------------------------- diff --git a/package.json b/package.json index 8f05189..09ed104 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "devDependencies": { "enzyme": "^2.4.1", "es5-shim": "4.5.4", + "jest": "^17.0.3", "mocha": "~3.1.2", "mocha-loader": "^1.0.0", "mocha-phantomjs": "git+https://github.com/garrensmith/mocha-phantomjs.git", @@ -103,7 +104,8 @@ "webpack:dev": "webpack --debug --progress --colors --config ./webpack.config.dev.js", "webpack:test": "webpack --debug --progress --colors --config ./webpack.config.test.js", "webpack:release": "webpack --debug --progress --colors --config ./webpack.config.release.js", - "test": "grunt test", + "jest": "jest --config ./jest-config.json", + "test": "npm run jest && grunt test", "phantomjs": "./node_modules/.bin/mocha-phantomjs --debug=false --ssl-protocol=sslv2 --web-security=false --ignore-ssl-errors=true ./test/runner.html", "couchdebug": "grunt couchdebug", "couchdb": "grunt couchdb",