Build: Upgrade QUnit to 1.14.0

This commit is contained in:
Michał Gołębiowski
2014-02-02 22:44:13 +01:00
parent a74ad04bc9
commit 95b21c6ec2
7 changed files with 1203 additions and 1134 deletions

View File

@@ -1326,7 +1326,7 @@ test("jQuery.parseHTML", function() {
equal( jQuery.parseHTML(), null, "Nothing in, null out." );
equal( jQuery.parseHTML( null ), null, "Null in, null out." );
equal( jQuery.parseHTML( "" ), null, "Empty string in, null out." );
raises(function() {
throws(function() {
jQuery.parseHTML( "<div></div>", document.getElementById("form") );
}, "Passing an element as the context raises an exception (context should be a document)");
@@ -1387,34 +1387,34 @@ test("jQuery.parseJSON", function() {
deepEqual( jQuery.parseJSON("\n{\"test\":1}\t"), { "test": 1 },
"Leading and trailing whitespace are ignored" );
raises(function() {
throws(function() {
jQuery.parseJSON();
}, null, "Undefined raises an error" );
raises( function() {
throws(function() {
jQuery.parseJSON( "" );
}, null, "Empty string raises an error" );
raises(function() {
throws(function() {
jQuery.parseJSON("''");
}, null, "Single-quoted string raises an error" );
/*
// Broken on IE8
raises(function() {
throws(function() {
jQuery.parseJSON("\" \\a \"");
}, null, "Invalid string escape raises an error" );
// Broken on IE8, Safari 5.1 Windows
raises(function() {
throws(function() {
jQuery.parseJSON("\"\t\"");
}, null, "Unescaped control character raises an error" );
// Broken on IE8
raises(function() {
throws(function() {
jQuery.parseJSON(".123");
}, null, "Number with no integer component raises an error" );
*/
raises(function() {
throws(function() {
var result = jQuery.parseJSON("0101");
// Support: IE9+
@@ -1423,22 +1423,22 @@ test("jQuery.parseJSON", function() {
throw new Error("close enough");
}
}, null, "Leading-zero number raises an error or is parsed as decimal" );
raises(function() {
throws(function() {
jQuery.parseJSON("{a:1}");
}, null, "Unquoted property raises an error" );
raises(function() {
throws(function() {
jQuery.parseJSON("{'a':1}");
}, null, "Single-quoted property raises an error" );
raises(function() {
throws(function() {
jQuery.parseJSON("[,]");
}, null, "Array element elision raises an error" );
raises(function() {
throws(function() {
jQuery.parseJSON("{},[]");
}, null, "Comma expression raises an error" );
raises(function() {
throws(function() {
jQuery.parseJSON("[]\n,{}");
}, null, "Newline-containing comma expression raises an error" );
raises(function() {
throws(function() {
jQuery.parseJSON("\"\"\n\"\"");
}, null, "Automatic semicolon insertion raises an error" );

View File

@@ -1319,7 +1319,7 @@ test( "callbacks that throw exceptions will be removed (#5684)", function() {
jQuery.fx.stop();
this.clock.tick( 1 );
raises( jQuery.fx.tick, TestException, "Exception was thrown" );
throws( jQuery.fx.tick, TestException, "Exception was thrown" );
// the second call shouldn't
jQuery.fx.tick();

View File

@@ -2183,7 +2183,7 @@ test( "html() - script exceptions bubble (#11743)", function() {
expect( 3 );
raises(function() {
throws(function() {
jQuery("#qunit-fixture").html("<script>undefined(); ok( false, 'Exception not thrown' );</script>");
ok( false, "Exception ignored" );
}, "Exception bubbled from inline script" );