Reputation: 143935
According to jasmine documentation, I should be able to run the testsuite running jasmine
.
On this repository running jasmine in the test directory does absolutely nothing, even after exporting JASMINE_CONFIG_PATH
to the jasmine.json
file or passing it as argument. Note that even changing a test so that it fails, I get no result, no error, nothing. The command just returns to the prompt.
This is the content of the file
$ more jasmine.json
{
"spec_dir": "test",
"stopSpecOnExpectationFailure": false,
"random": false,
"spec_files": ["*spec.js"]
}
(venv) sborini@MacBook-Pro:test (protocol-host-rewrite) [1 stash] $ ls `which jasmine`
/usr/local/bin/jasmine
package.json
{
"version": "1.4.0-dev",
"name": "configurable-http-proxy",
"description": "A configurable-on-the-fly HTTP Proxy",
"author": "Jupyter Developers",
"license": "BSD-3-Clause",
"repository": {
"type": "git",
"url": "https://github.com/jupyterhub/configurable-http-proxy.git"
},
"dependencies": {
"commander": "~2.9",
"http-proxy": "~1.13.2",
"lynx": "^0.2.0",
"strftime": "~0.9",
"winston": "~2.2"
},
"devDependencies": {
"jasmine": "^2.4.1",
"jshint": "^2.9.2",
"nyc": "^6.4.0",
"request": "~2",
"ws": "^1.1"
},
"main": "index.js",
"files": [
"index.js",
"lib/configproxy.js",
"lib/trie.js",
"lib/error/*.html",
"bin/configurable-http-proxy"
],
"bin": {
"configurable-http-proxy": "bin/configurable-http-proxy"
},
"scripts": {
"jshint": "jshint bin/ lib/ test/",
"test": "nyc jasmine JASMINE_CONFIG_PATH=test/jasmine.json",
"coverage-html": "nyc report --reporter=html",
"codecov": "nyc report --reporter=lcov && codecov"
}
}
Note that invoking it with npm run test
does produce the output of the coverage, but if I err a test, It just produces the following output
(venv) sborini@MacBook-Pro:configurable-http-proxy (protocol-host-rewrite) [1 stash] $ npm run test
> [email protected] test /Users/sborini/Work/github/stefanoborini/configurable-http-proxy
> nyc jasmine JASMINE_CONFIG_PATH=test/jasmine.json
-----------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
-----------------|----------|----------|----------|----------|----------------|
lib/ | 89.9 | 75 | 83.58 | 90.36 | |
configproxy.js | 87.01 | 64.81 | 84.78 | 87.6 |... 436,437,444 |
testutil.js | 93.83 | 93.75 | 73.33 | 93.83 |... 114,116,117 |
trie.js | 96.72 | 95 | 100 | 96.72 | 15,19 |
-----------------|----------|----------|----------|----------|----------------|
All files | 89.9 | 75 | 83.58 | 90.36 | |
-----------------|----------|----------|----------|----------|----------------|
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/Cellar/node/5.10.1/bin/node" "/usr/local/bin/npm" "run" "test"
npm ERR! node v5.10.1
npm ERR! npm v3.8.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test: `nyc jasmine JASMINE_CONFIG_PATH=test/jasmine.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script 'nyc jasmine JASMINE_CONFIG_PATH=test/jasmine.json'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the configurable-http-proxy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! nyc jasmine JASMINE_CONFIG_PATH=test/jasmine.json
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs configurable-http-proxy
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls configurable-http-proxy
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/sborini/Work/github/stefanoborini/configurable-http-proxy/npm-debug.log
Which does not tell me anything about the actual failing test.
Upvotes: 1
Views: 428
Reputation: 143935
To all the googlers, it's a bug in jasmine.
https://github.com/jasmine/jasmine-npm/issues/90
Install and use the old version:
npm install jasmine@~2.4
This works.
Upvotes: 3