ember-a11y / ember-a11y-testing

A suite of accessibility tests that can be run within the Ember testing framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot call `currentURL` middleware reporter error

drewlee opened this issue · comments

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.

Fixed and released v6.1.1 via PR #514 .