diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2021-01-11 18:20:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-11 18:20:36 +0100 |
commit | d38528b17a846b7ca4513b41150a05436546292d (patch) | |
tree | f13dbe9c9f1e55a36f51168ac7c5cb6f007b8eaf /test/unit/ajax.js | |
parent | 3bbbc11111840d6fd5160db13f2c1a9acb05c4c4 (diff) | |
download | jquery-d38528b17a846b7ca4513b41150a05436546292d.tar.gz jquery-d38528b17a846b7ca4513b41150a05436546292d.zip |
Tests: Fix tests for not auto-executing scripts without dataType
Two issues are fixed in testing for responses with a script Content-Type not
getting auto-executed unless an explicit `dataType: "script"` is provided:
* the test is now using a correct "text/javascript" Content-Type; it was using
"text/html" until now which doesn't really check if the fix works
* the Node.js based version of the tests didn't account for an empty `header`
query string parameter
Closes gh-4824
Ref gh-2432
Ref gh-2588
Ref 39cdb8c9aa0fde68f733553ba050a2ba9d86474c
Diffstat (limited to 'test/unit/ajax.js')
-rw-r--r-- | test/unit/ajax.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js index b3b78cc5f..271496ce1 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -118,7 +118,7 @@ QUnit.module( "ajax", { return { create: function( options ) { options.crossDomain = true; - return jQuery.ajax( url( "mock.php?action=script" ), options ); + return jQuery.ajax( url( "mock.php?action=script&header" ), options ); }, success: function() { assert.ok( true, "success" ); |