ember-a11y / ember-a11y-testing

A suite of accessibility tests that can be run within the Ember testing framework
MIT License
137 stars 49 forks source link

Cannot call `currentURL` middleware reporter error #513

Closed drewlee closed 10 months ago

drewlee commented 11 months ago

Running ember-a11y-testing using the middleware reporter results in a precedent of tests failing with the Cannot call 'currentURL' error.

Cannot call `currentURL` without having first called `setupApplicationContext`."Source:
Error: Cannot call `currentURL` without having first called `setupApplicationContext`.
    at currentURL (https://localhost:4444/assets/test-support.js:21927:13)
    at middlewareReporter (https://localhost:4444/assets/test-support.js:31356:49)
    at async https://localhost:4444/assets/test-support.js:31289:11...

The exact reason is uncertain, as audits are invoked after setupApplicationTests is called. However, we should probably have better insulation where currentURL is called so that the entire test doesn't fall over when this error is encountered.

drewlee commented 10 months ago

Fixed and released v6.1.1 via PR #514 .