5

I change the code, extend some functionality and add new unittest for that. Now, when I run my unit tests with karma (test framework - jasmine), it throw me an error

'There is no timestamp for /libs/angular-bootstrap/ui-bootstrap-tpls.js!'
Uncaught Error: Script error for: angular-bootstrap
http://requirejs.org/docs/errors.html#scripterror
at http://localhost:9876/base/node_modules/karma-requirejs/lib/require.js?1379984163000:138

What I'm doing wrong?

4

3 に答える 3

1

質問は古いです。OPはすでに彼の問題を解決していますが、2セント追加します。

pathsエラー メッセージ (最初のエラー行の終わり) から、 (またはdeps) 拡張子のmain-test.js付いたファイルが含まれていたと結論付けることができます.jsRequireJS では、拡張子なしでファイル名を呼び出す必要があるため、paths(またはdeps) は多かれ少なかれ次のようになります。

paths: {
    'ui-bootstrap': 'libs/angular-bootstrap/ui-bootstrap-tpls' // <- without the extension
}
于 2015-03-08T03:57:43.680 に答える