Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd38528b

Browse files
authored
Tests: Fix tests for not auto-executing scripts without dataType
Two issues are fixed in testing for responses with a script Content-Type notgetting 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 parameterClosesgh-4824Refgh-2432Refgh-2588Ref39cdb8c
1 parent3bbbc11 commitd38528b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎test/middleware-mockserver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var mocks = {
6262
script:function(req,resp){
6363
if(req.query.header==="ecma"){
6464
resp.writeHead(200,{"content-type":"application/ecmascript"});
65-
}elseif(req.query.header){
65+
}elseif("header"inreq.query){
6666
resp.writeHead(200,{"content-type":"text/javascript"});
6767
}else{
6868
resp.writeHead(200,{"content-type":"text/html"});

‎test/unit/ajax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ QUnit.module( "ajax", {
118118
return{
119119
create:function(options){
120120
options.crossDomain=true;
121-
returnjQuery.ajax(url("mock.php?action=script"),options);
121+
returnjQuery.ajax(url("mock.php?action=script&header"),options);
122122
},
123123
success:function(){
124124
assert.ok(true,"success");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp