dequelabs / axe-core

Accessibility engine for automated Web UI testing
https://www.deque.com/axe/
Mozilla Public License 2.0
5.87k stars 765 forks source link

Convert tests to es modules #2168

Open straker opened 4 years ago

straker commented 4 years ago

This may turn out to need to be split into more than one ticket, but putting a general ticket in for now. We need to babel our unit tests so we can update them to use es modules (and es6). Once we do that, we can fix some of the unit tests that we commented out or skipped due to no way to mock functions.

Edit by Wilco: We have been disabling a number of tests, as part of converting to ES modules, those tests need to be re-enabled:

WilcoFiers commented 2 years ago

Converting to ES has always been kind of difficult because it would have involved using Babel or some other format that can downgrade to ES5. But as per #3644 axe-core tests no longer need to run in IE11, meaning we can just use JavaScript features available in modern browsers.

With this, I think we can start migrating our tests over to at ES2021, which is what we're using for axe-core proper too.