grunt-contrib-qunit

Continue certain tasks in grunt even if one fails

孤街醉人 提交于 2019-12-18 14:03:39
问题 Is there a way to configure a sequence of tasks so that specific subsequent ones (I don't want --force on the whole batch) run even if one fails? For example, consider a case like this Create some temporary files Run some unit tests which involve those temporary files Clean up those temporary files I can do this: grunt.registerTask('testTheTemp', ['makeTempFiles', 'qunit', 'removeTempFiles']); But if qunit fails then the removeTempFiles task never runs. 回答1: Here's one workaround. It's not

PhantomJS, Qunit, Grunt testing browser resize widgets

廉价感情. 提交于 2019-12-11 08:25:13
问题 I've created a jQuery UI Widget that resizes a DIV/thing to fill up the browser screen. It all works fine but now I want to create unit tests for testing that it's resizing and keeping to boundaries etc. I'm using Grunt with grunt-contrib-qunit , which uses PhantomJS to do tests but am now unsure how I can test browser resizing at this point as it's not possible via JS to resize a browser. Perhaps PhantomJS provides something that allows me to alter it at runtime? 回答1: Check CasperJS library.