Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Fix tests for not auto-executing scripts without dataType #4824

Merged
merged 1 commit into from
Jan 11, 2021

Conversation

mgol
Copy link
Member

@mgol mgol commented Jan 4, 2021

Summary

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

Ref gh-2432
Ref gh-2588
Ref 39cdb8c

Checklist

@mgol mgol added Needs review Tests Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. labels Jan 4, 2021
@mgol mgol added this to the 3.6.0 milestone Jan 4, 2021
@mgol mgol self-assigned this Jan 4, 2021
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

Ref jquerygh-2432
Ref jquerygh-2588
Ref 39cdb8c
@mgol mgol force-pushed the ajax-script-crossorigin-test-gh-2432 branch from 51358da to 5f57ee5 Compare January 4, 2021 20:29
Copy link
Member

@timmywil timmywil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@timmywil timmywil removed the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Jan 11, 2021
@mgol mgol merged commit d38528b into jquery:master Jan 11, 2021
@mgol mgol deleted the ajax-script-crossorigin-test-gh-2432 branch January 11, 2021 17:20
@mgol mgol removed the Needs review label Jan 11, 2021
mgol added a commit to mgol/jquery that referenced this pull request Jan 11, 2021
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 jquerygh-4824
Ref jquerygh-2432
Ref jquerygh-2588
Ref 39cdb8c

(cherry picked from commit d38528b)
@mgol
Copy link
Member Author

mgol commented Jan 11, 2021

Landed on master in d38528b & on 3.x-stable in 7298e04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants