Search Results for: Raw silk thrown
a block, error string, and assertion message has been removed and will now throw an exception. use a regular expression instead. before: qunit.test( "throws", function( assert ) { assert.throws( function() { throw new error( "this is an error" ); }, "this is an error", "an error should have been thrown
" ); }); after: qunit.test( "throws", function( assert ) { assert.throws( function() { throw new error( "this is an error" ); }, /^this is an error$/, "an error should have been thrown" ); }); note that in the two-argument overload assert.throws( block, string ), the string argument has always been interpreted...
https://qunitjs.com/upgrade-guide-2.x/
a block, error string, and assertion message has been removed and will now throw an exception. use a regular expression instead. before: qunit.test( "throws", function( assert ) { assert.throws( function() { throw new error( "this is an error" ); }, "this is an error", "an error should have been thrown
" ); }); after: qunit.test( "throws", function( assert ) { assert.throws( function() { throw new error( "this is an error" ); }, /^this is an error$/, "an error should have been thrown" ); }); note that in the two-argument overload assert.throws( block, string ), the string argument has always been interpreted...
https://qunitjs.com/upgrade-guide-2.x/