我正在尝试调试grunt-contrib-jasmine
是否导致了问题,或phantomjs
我的代码库中有一些失败,但是grunt没有报告为失败
Running "jasmine:dev" (jasmine) task
Testing jasmine specs via PhantomJS
>> TypeError: 'undefined' is not a function (evaluating '$(document).foundation1()') at
>> assets/js/build/theme-bundle.js:1203
>> js-tests/vendors/jquery/jquery-1.11.1.min.js:2
>> js-tests/vendors/jquery/jquery-1.11.1.min.js:2
>> js-tests/vendors/jquery/jquery-1.11.1.min.js:2
>> js-tests/vendors/jquery/jquery-1.11.1.min.js:2 J
...........................................................
59 specs in 0.287s.
>> 0 failures
Running "phplint:files" (phplint) task
Done, without errors.
这是我的Gruntfile.js
jasmine: {
dev: {
src : ['assets/js/build/*.js'],
options: {
specs: 'js-tests/build/specs.js',
outfile: '_SpecRunner.html',
display: 'short',
summary: true,
styles : [
'assets/css/theme.css'
],
vendor: [
'js-tests/vendors/jquery/jquery-1.11.1.min.js',
'js-tests/vendors/underscore/underscore-min.js',
'js-tests/vendors/backbone/backbone-min.js',
'assets/vendor/foundation/vendor/topbar.js',
'assets/vendor/foundation/vendor/reveal.js',
'assets/vendor/foundation/js/foundation.js',
'assets/vendor/foundation/js/vendor/modernizr.js',
'assets/vendor/foundation/js/foundation/foundation.topbar.js',
'assets/vendor/jquery-cookie/jquery.cookie-1.4.1.min.js',
'assets/vendor/slick/*.js',
'js-tests/vendors/wordpress/wp-util.js',
'js-tests/vendors/stub/global.js',
'js-tests/vendors/stub/facebook.js',
'js-tests/vendors/stub/mandrill.js',
'js-tests/vendors/wordpress/tinymce.min.js',
'js-tests/vendors/jasmine-jquery/jasmine-jquery.js'
]
}
}
},
这是依赖项
"devDependencies": {
"autoprefixer-core": "^5.2.0",
"browserify": "^8.1.3",
"browserify-shim": "3.8.7",
"grunt": "^0.4.5",
"grunt-browserify": "^3.3.0",
"grunt-contrib-jasmine": "^0.9.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-grunticon": "^1.6.0",
"grunt-pagespeed": "~0.4.1",
"grunt-postcss": "^0.5.1",
"grunt-sass": "~0.18.0",
"grunt-scss-lint": "^0.3.4",
"grunt-strip-css-comments": "^1.1.0",
"mochify": "^2.1.0",
"phantomjs": "1.9.17",
"phplint": "^1.2.0",
"remapify": "2.0.0"
},