Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
js3110 committed Jan 2, 2025
2 parents 90ecb47 + a6c505e commit b521932
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/testthat/test-generate_col_defs.R
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
source(system.file("shiny/functions/generate_col_defs.R", package = "aNCA"))

describe("generate_col_defs", {
it("generates column definitions with labels", {
it("generates a list of column definitions with labels", {
data <- data.frame(
USUBJID = c(1, 2, 3),
AVAL = c(4, 5, 6)
)
attr(data$USUBJID, "label") <- "Unique Subject Identifier"
attr(data$AVAL, "label") <- "Analysis Value"
col_defs <- generate_col_defs(data)
expect_type(col_defs, "list")
expect_equal(col_defs$USUBJID$header$attribs$title, "Unique Subject Identifier")
expect_equal(col_defs$AVAL$header$attribs$title, "Analysis Value")
})
it("returns a list of column definitions", {
data <- data.frame(
USUBJID = c(1, 2, 3),
AVAL = c(4, 5, 6)
)
col_defs <- generate_col_defs(data)
expect_type(col_defs, "list")
})

})

0 comments on commit b521932

Please sign in to comment.