jquery / jquery

jQuery JavaScript Library
https://jquery.com
MIT License
58.96k stars 20.62k forks source link

Tests: add support for latest and latest-\d+ in test runner #5423

Closed timmywil closed 3 months ago

timmywil commented 3 months ago

Adds support for filtering browser version by "latest" and "latest-n", which we can now use in the browserstack.yml.

I also made it so npm run test:unit -- --list-browsers=_latest lists the latest version of all browsers, rather than matching on the last browser in the sorted list.

I considered adding support for "latest" to OS versions, but didn't want to spend too much time on it since OS versions don't get updated nearly as often as browser versions.

I looked into setting browser versions using the environment, but workflows do not support environment variables at the matrix level, only in steps. There were a couple ways around that, but they were convoluted.

Checklist

timmywil commented 3 months ago

Closing in favor of another upcoming PR that brings in all the improvements from the 3.x PR. I should have the PR feedback from this one in both of those PRs.