aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMike Alup <malsup@gmail.com>2010-01-25 18:48:52 -0500
committerjeresig <jeresig@gmail.com>2010-01-25 18:48:52 -0500
commitca90ffb332eafc93b8107aeb2afa7473132392fd (patch)
treee459eb7e706687aaae3401725efb804dd67eb911 /test
parentbed759c95ca6d796125653b540e8611dc63b38bb (diff)
downloadjquery-ca90ffb332eafc93b8107aeb2afa7473132392fd.tar.gz
jquery-ca90ffb332eafc93b8107aeb2afa7473132392fd.zip
Provided detailed message for JSON parse errors. Fixes #4435.
Diffstat (limited to 'test')
-rw-r--r--test/unit/ajax.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index 195fa27ca..f6809d539 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -892,7 +892,7 @@ test("jQuery.ajax() - script, Remote with scheme-less URL", function() {
});
test("jQuery.ajax() - malformed JSON", function() {
- expect(1);
+ expect(2);
stop();
@@ -903,8 +903,9 @@ test("jQuery.ajax() - malformed JSON", function() {
ok( false, "Success." );
start();
},
- error: function(xhr, msg) {
+ error: function(xhr, msg, detailedMsg) {
equals( "parsererror", msg, "A parse error occurred." );
+ ok( /^Invalid JSON/.test(detailedMsg), "Detailed parsererror message provided" );
start();
}
});