FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Test against jQuery 3.4.1 by kevin-brown · Pull Request #5531 · select2/select2 · GitHub

Test against jQuery 3.4.1 - #5531

Merged
kevin-brown merged 3 commits into
developfrom
jquery-3
Jun 26, 2019
Merged

Test against jQuery 3.4.1#5531
kevin-brown merged 3 commits into
developfrom
jquery-3

Conversation

Copy link
Copy Markdown
Member

This pull request includes a

  • Bug fix
  • New feature
  • Translation
  • Tests

The following changes were made

  • Added unit and integration tests against jQuery 3.4.1
  • Resolved the few tests that failed because of deprecations/removals

There was a change in jQuery 3 that ensures that the return value of `.val()` on a multiple select is always an array. This is a breaking change from previous versions, where `null` or `undefined` were returned in these scenarios. Because we cannot `assert.equal` on a list of possible values, these assertions were switched to `assert.ok` which should be good enough.
Before we were assuming that there were no units, and only were we stripping them out if we were expecting 3 digits. Now we just strip out all non-digit characters, so that should do the job and get us what we want.

There was a change in jQuery 3.2.0 that caused the units to be returned in these specific calls. They were not previously being returned, so this was not actually an issue.
No tests appear to be currently failing.
kevin-brown added this to the 4.0.8 milestone Jun 5, 2019
kevin-brown merged commit 9491e1a into develop Jun 26, 2019
kevin-brown deleted the jquery-3 branch June 26, 2019 02:05
maxwellfet928 pushed a commit to maxwellfet928/select2 that referenced this pull request Jun 8, 2026
* Update tests to be compatible with jQuery 3.0.0

There was a change in jQuery 3 that ensures that the return value of `.val()` on a multiple select is always an array. This is a breaking change from previous versions, where `null` or `undefined` were returned in these scenarios. Because we cannot `assert.equal` on a list of possible values, these assertions were switched to `assert.ok` which should be good enough.

* Properly strip out units in positioning tests

Before we were assuming that there were no units, and only were we stripping them out if we were expecting 3 digits. Now we just strip out all non-digit characters, so that should do the job and get us what we want.

There was a change in jQuery 3.2.0 that caused the units to be returned in these specific calls. They were not previously being returned, so this was not actually an issue.

* Add automated testing against jQuery 3.4.1

No tests appear to be currently failing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL