Last active
August 5, 2020 07:28
-
-
Save neelsoumya/3f9c950141ba8dbc36b92818c4faa511 to your computer and use it in GitHub Desktop.
An example to show a testing framework in R using the testthat package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| An example to show a testing framework in R using the testthat package |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(testthat) | |
| string <- "Testing is fun! hellooooo..." | |
| expect_match(string, "Testing") | |
| expect_match(string, 'hello', ignore.case = TRUE) | |
| # expect_output(as.character(string), 'hello') |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An example to show a testing framework in R using the testthat package