3

Windowsでジャスミンノードテストを実行しています。package.json に次のコマンドがあります。

"scripts": {
    "test": "./node_modules/.bin/jasmine-node --coffee sample_spec.coffee",
  }

npm テストを実行すると、次のエラーが発生します。

TypeError: Cannot read property '1' of null
    at Object.<anonymous> (C:\Documents and Settings\rohan\RubymineProjects\Node
Demo\node_modules\jasmine-node\lib\jasmine-node\index.js:24:57)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (C:\Documents and Settings\rohan\RubymineProjects\Node
Demo\node_modules\jasmine-node\lib\jasmine-node\cli.js:1:77)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0
4

2 に答える 2

0

おそらく問題を解決する最善の方法ではありませんが、cygwin をインストールし、すべてのジャスミン コマンドを実行しました。Windows のコマンド ラインから jasmine などのモジュールを使用すると、作業が楽になります。

于 2015-07-06T17:29:47.727 に答える