Repository navigation
[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 |
rwjblue
left a comment
There was a problem hiding this comment.
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.
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.
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.
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:
expectAssertionandexpectDeprecationare 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?