Skip to content

Commit

Permalink
Update tests to be compatible with R 4.0.0
Browse files Browse the repository at this point in the history
R 4.0.0 uses stringsAsFactors = TRUE by default when creating data frames.
  • Loading branch information
glin committed Feb 29, 2020
1 parent bbf2271 commit ed95e9b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: reactable
Type: Package
Title: Interactive Data Tables Based on 'React Table'
Version: 0.1.0
Version: 0.1.0.1
Authors@R: c(
person("Greg", "Lin", email = "glin@glin.io", role = c("aut", "cre")),
person("Tanner", "Linsley", role = c("ctb", "cph"), comment = "React Table library")
Expand Down
13 changes: 2 additions & 11 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
## Resubmission
This is a resubmission. In this version I have:

* Documented return values for all functions.

## Resubmission
This is a resubmission. In this version I have:

* Added single quotes to package and software names in the Description.

* Replaced `\dontrun{}` with `if (interactive()) {}` in examples.
This submission updates the tests to be compatible with R 4.0.0 using
stringsAsFactors = FALSE by default.
4 changes: 2 additions & 2 deletions tests/testthat/test-reactable.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ test_that("reactable handles invalid args", {

test_that("reactable", {
# Default args
tbl <- reactable(data.frame(x = 1, y = "b"))
tbl <- reactable(data.frame(x = 1, y = "b", stringsAsFactors = TRUE))
attribs <- getAttribs(tbl)
data <- data.frame(x = 1, y = "b")
data <- jsonlite::toJSON(data, dataframe = "columns", rownames = FALSE)
Expand All @@ -84,7 +84,7 @@ test_that("reactable", {
expect_null(tbl$elementId)

# Table options
tbl <- reactable(data.frame(x = "a"), rownames = TRUE,
tbl <- reactable(data.frame(x = "a", stringsAsFactors = TRUE), rownames = TRUE,
columnGroups = list(colGroup("group", "x")),
sortable = FALSE, resizable = TRUE, filterable = TRUE, searchable = TRUE,
defaultSortOrder = "desc", defaultSorted = list(x = "asc"),
Expand Down

0 comments on commit ed95e9b

Please sign in to comment.