Skip to content

Conversation

@straker
Copy link
Contributor

@straker straker commented Sep 3, 2024

This should fix the issue with the tests failing onwindowHeight being different between two consecutive runs.

I also added a deep axe-core results compare function that can do two significant things for us when comparing result objects. First it can ignore keys (like timestamp) so we don't have to always set it equal to each other in the tests. Second is that instead of dumping the entire result objects when a value is different this will output they key path and the values that are different which make debugging a lot easier.

Expected result.testEnvironment.windowHeight to equal "948" but got "896"

@straker straker requested a review from a team as a code owner September 3, 2024 15:25
@straker straker merged commit bdd80c2 into develop Sep 3, 2024
@straker straker deleted the fix-deep-compare-results branch September 3, 2024 16:00
straker added a commit that referenced this pull request Oct 16, 2024
This should fix the issue with the tests failing on`windowHeight` being
different between two consecutive runs.

I also added a deep axe-core results compare function that can do two
significant things for us when comparing result objects. First it can
ignore keys (like `timestamp`) so we don't have to always set it equal
to each other in the tests. Second is that instead of dumping the entire
result objects when a value is different this will output they key path
and the values that are different which make debugging a lot easier.

```
Expected result.testEnvironment.windowHeight to equal "948" but got "896"
```
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.

3 participants