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

Assert: Clone actual steps array to avoid passing internal reference #1267

Merged
merged 2 commits into from
Mar 1, 2018

Conversation

trentmwillis
Copy link
Member

Fixes #1266

The test setup is a bit awkward to verify this fix, so if anyone has a better idea, let me know!

Copy link
Contributor

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

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

LGTM (this is one of the less convoluted setups I've seen here 😁).


var loggedAssertions = {};

QUnit.log( function( details ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that (AFAIK) these functions cannot be removed, this QUnit.log will continue to fill loggedAssertions for all subsequent (and unrelated) tests, right?

Does that pose a concern (or maybe it’s “fine”)?

Copy link
Member Author

Choose a reason for hiding this comment

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

It only ever logs entries into loggedAssertions["verification-assertion"], so I don't see much of an issue with it (given that I don't believe any other assertion has that message in our code base)

@trentmwillis trentmwillis merged commit b16b16e into qunitjs:master Mar 1, 2018
@trentmwillis trentmwillis deleted the empty-steps branch March 1, 2018 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

actual is being emptied after verifySteps(..) is called
3 participants