Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: ensure after and reporter methods can run in isolated context #3136

Merged
merged 3 commits into from
Aug 26, 2021

Conversation

straker
Copy link
Contributor

@straker straker commented Aug 25, 2021

This was a difficult one to set up. Hopefully this does what we want and ensures our after and reporter methods can run when window and document are not there.

@straker straker requested a review from a team as a code owner August 25, 2021 23:56
Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple minor points


function setEmptyReporter() {
win.axeConfigure({
reporter: function(results, options, callback) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like the raw reporter. Why not use that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to use a reporter in case the reporter throws. A simple custom reporter ensures it wont throw by accessing things it shouldn't

@straker straker merged commit 7215dc4 into develop Aug 26, 2021
@straker straker deleted the test-isolated branch August 26, 2021 15:28
straker added a commit that referenced this pull request Oct 18, 2021
…3136)

* tests: ensure after and reporter methods can run in isolated context

* Update test/integration/full/isolated-env/isolated-env.js

Co-authored-by: Wilco Fiers <[email protected]>

* cleanup

Co-authored-by: Wilco Fiers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants