Skip to content

Commit 558c788

Browse files
committed
Tweak expectation() docs
To make it more clear this is not for developers. Fixes #2264.
1 parent 58e1189 commit 558c788

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

R/expectation.R

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ expect <- function(
3939
}
4040
}
4141

42-
#' Construct an expectation object
42+
#' Expectation conditions
4343
#'
4444
#' @description
45-
#' For advanced use only. If you are creating your own expectation, you should
46-
#' call [pass()] or [fail()]. See `vignette("custom-expectation")` for more
47-
#' details.
45+
#' `new_expectation()` creates an expectation condition object and
46+
#' `exp_signal()` signals it. `expectation()` does both. `is.expectation()`
47+
#' tests if a captured condition is a testthat expectation.
4848
#'
49-
#' `new_expectation()` creates an expectation object and `exp_signal()` signals
50-
#' it. `expectation()` does both.
49+
#' These functions are primarily for internal use. If you are creating your
50+
#' own expectation, you do not need these functions are instead should use
51+
#' [pass()] or [fail()]. See `vignette("custom-expectation")` for more
52+
#' details.
5153
#'
5254
#' @param type Expectation type. Must be one of "success", "failure", "error",
5355
#' "skip", "warning".

man/expectation.Rd

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)