-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Cleanup] Convert container tests to new style #15990
Conversation
Yes, we should migrate to a custom
Correct, however when assertions are not in the top down flow of code I do think we should have an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I only have one general comment around using assert
argument instead of this.assert
, but I'm happy to tackle that in a follow up...
|
||
QUnit.module('Owner', {}); | ||
moduleFor('Owner', class extends AbstractTestCase { | ||
['@test An owner can be set with `setOwner` and retrieved with `getOwner`']() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd generally prefer to add assert
as the callback arg and use it below (instead of this.assert
). It is simpler, and "feels" more idiomatic to me.
@chancancode / @thoov / @locks - Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been doing this.assert
because of the code linked in the quest issue, but I prefer the argument version too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with having assert as an argument over off of this
. Definitely is more "standard" when looking at docs and existing testing approaches in the wild. I will update the issue to have more clear explanations about things we are looking for and better examples
21325bb
to
c2d3852
Compare
Updated from |
Thank you! |
See #15988
Two things I observed while converting:
expectAssertion
andexpectDeprecation
are not available onthis.assert
. Is this intended? Is there a newer replacement for that?assert.expect(1)
which is not needed as far as I know, correct?