-
Notifications
You must be signed in to change notification settings - Fork 24
Test coverage using covr #431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7d53cdf
50a3ddb
f25ce9d
fbb3d46
0134024
ffceaf9
019be63
ec28a9e
5a772e9
eeb1a57
a335bfa
9f3ec62
d2daa72
ca72da7
771676c
414a350
c056da8
7b14376
829e27b
08cb4ff
8b0c4f6
bc5f6ae
e31dc54
d03964a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
|
|
||
| expect_no_error(rhino::covr_r()) | ||
| expect_no_error(rhino::covr_report()) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #' @export | ||
| hello <- function() { | ||
| "Check out Rhino docs!" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # nolint start | ||
| box::use( | ||
| shiny[NS, bootstrapPage, div, moduleServer, renderUI, tags, uiOutput], | ||
| ) | ||
|
|
||
| box::use( | ||
| app/logic/hello[hello], | ||
| ) | ||
|
|
||
| #' @export | ||
| ui <- function(id) { | ||
| ns <- NS(id) | ||
| bootstrapPage( | ||
| uiOutput(ns("message")) | ||
| ) | ||
| } | ||
|
|
||
| #' @export | ||
| server <- function(id) { | ||
| moduleServer(id, function(input, output, session) { | ||
| output$message <- renderUI({ | ||
| div( | ||
| style = "display: flex; justify-content: center; align-items: center; height: 100vh;", | ||
| tags$h1( | ||
| tags$a( | ||
| hello(), | ||
| href = "https://appsilon.github.io/rhino/" | ||
| ) | ||
| ) | ||
| ) | ||
| }) | ||
| }) | ||
| } | ||
| # nolint end |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be good to cover two additional cases:
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| box::use(testthat[describe, expect_identical, it], ) | ||
| box::use(app/logic/hello[hello], ) | ||
|
|
||
| describe("hello()", { | ||
| it("should return the welcome message", { | ||
| expect_identical(hello(), "Check out Rhino docs!") | ||
| }) | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add missing line at the end.