単体テストで jasmine-jquery を使用して BackboneJS ビューをテストしようとしていますが、テストを実行しようとすると次のエラーが発生します。
「jasmine:src」(ジャスミン)タスクの実行
PhantomJS によるジャスミン仕様のテスト
TypeError: 'undefined' はオブジェクトではありません ('jasmine.spiedEventsKey = function (selector, eventName) { return [$(selector).selector, eventName].toString() }') を評価します)
テスト/ベンダー/jasmine-jquery-master/lib/jasmine-jquery.js:40
テスト/ベンダー/jasmine-jquery-master/lib/jasmine-jquery.js:34
テスト/ベンダー/jasmine-jquery-master/lib/jasmine-jquery.js:838
grunt、phantomjs、grunt-contrib-jasmine タスク、および grunt-template-jasmine-requirejs を使用しています。
これは私のうなり声の設定です
jasmine : {
src : 'lib/**/*.js',
options : {
vendor: [
'test/vendor/Sinon/sinon-1.14.1.js',
'test/vendor/jasmine-jquery-master/vendor/jquery/jquery.js',
'test/vendor/jasmine-jquery-master/lib/jasmine-jquery.js'
],
specs: 'test/spec/**/*.js',
helpers: 'test/helpers/**/*.js',
template: require('grunt-template-jasmine-requirejs'),
templateOptions: {
requireConfigFile: 'lib/js/main.js',
requireConfig: {
baseUrl: './lib/js/',
paths: {
'app': 'app',
'router': 'router',
'text': './text-master/text',
}
}
}
}
},
これを間違って設定したのでしょうか、それとも単に jasmine-jquery をヘッドレスで実行できないのでしょうか?
ありがとう