2016-09-06 8 views
0

jasmine documentationによれば、私はjasmineを実行しているテストスイートを実行できるはずです。ジャスミン呼び出しは何も返さない

On this repositoryJASMINE_CONFIG_PATHjasmine.jsonファイルにエクスポートするか、引数として渡しても、テストディレクトリにジャスミンを実行しても何も起こりません。テストが失敗するように変更しても、結果は得られず、エラーもなくなります。コマンドはプロンプトに戻るだけです。

この

はファイル npm run testでそれを呼び出すことは報道の出力を生成しないことを

$ more jasmine.json 
{ 
    "spec_dir": "test", 
    "stopSpecOnExpectationFailure": false, 
    "random": false, 
    "spec_files": ["*spec.js"] 
} 


(venv) [email protected]: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" 
    } 
} 

ノートの内容ですが、私はテストを誤る場合は、それを次の出力を生成するだけです。

(venv) [email protected]: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 

実際に失敗したテストについてのこと。

+0

「ジャスミン」がbashからあなたに与えるものと、あなたの 'package.json'がどのように見えるかを見せてもらえますか? – broguinn

+0

@ブルンニン出来ました。 –

+0

どこで 'JASMINE_CONFIG_PATH'を設定しますか?そうでなければ、spec/supportで 'jasmine.json'を探します。 – broguinn

答えて

2

すべてのGoogle社員にとって、ジャスミンのバグです。

https://github.com/jasmine/jasmine-npm/issues/90

古いバージョンをインストールして使用します。

npm install [email protected]~2.4 

この作品を。

+1

再び、SOが完全に毒性のあるコミュニティであることを確認する。私は、私が経験したことのない環境について私が知ることができることの完全な情報を持ってこの質問を投稿しました。唯一得たのはダウンボートでした。 –

+0

芽を心配しないでください。私はそれらの下投票に反対するように投票した。開発を続ける:) – PourMeSomeCode

関連する問題