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
The first step in any expectation is to use `quasi_label()` to capture a "labelled value", i.e. an list that contains both the value (`$val`) for testing and a label (`$lab`) for messaging. This is a pattern that exists for fairly esoteric reasons; you don't need to understand, just copy and paste it 🙂.
42
+
The first step in any expectation is to use `quasi_label()` to capture a "labelled value", i.e. a list that contains both the value (`$val`) for testing and a label (`$lab`) for messaging. This is a pattern that exists for fairly esoteric reasons; you don't need to understand, just copy and paste it 🙂.
43
43
44
44
Next you need to check each way that `object` could be broken. In most cases, it's easier to check for problems one by one, using early returns to `fail()` when any expectation is violated as that makes it easier to write failure messages. It's good practice to state both what the object is and what you expected in your failures.
45
45
@@ -62,7 +62,7 @@ Once you've written your expectation, you need to test it, and luckily testthat
62
62
*`expect_failure()` checks that your expectation emits exactly one failure and zero successes.
63
63
*`expect_failure_snapshot()` captures the failure message in a snapshot, making it easier to review if it's useful or not.
64
64
65
-
The first two expectations are particularly important because they ensure that your expectation reports the correct number of succeses and failures to the user.
65
+
The first two expectations are particularly important because they ensure that your expectation reports the correct number of successes and failures to the user.
0 commit comments