You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the discussion in #666, there are some anti-patterns around assert.expect. We should document how to use it properly, along with the anti-patterns to avoid.
This is most commonly used as assert.expect(0), which indicates that a test may pass without making any assertions. This means the test is only used to verify that the code runs to completion, without any uncaught errors. This is is essentially the inverse of assert.throws().
This can also be used to explicitly require a certain number of assertions to be recorded in a given test. If afterwards the number of assertions does not match the expected count, the test will fail.
Based on the discussion in #666, there are some anti-patterns around
assert.expect
. We should document how to use it properly, along with the anti-patterns to avoid.Assigning this to @JamesMGreene since he had some examples for that. Along with updating http://api.qunitjs.com/expect/ we can also check other pages, like the cookbook.
The text was updated successfully, but these errors were encountered: