Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
larmarange committed Dec 27, 2024
1 parent 94d0243 commit d427dd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion tests/testthat/test-add_term_labels.R
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ test_that("tidy_add_term_labels() works with variables having non standard name"
)
)

res <- lm(
res <-
lm(
response ~ `age at dx` + `drug type`,
data = gtsummary::trial |>
dplyr::select(response, `age at dx` = age, `drug type` = trt)
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-tidy_plus_plus.R
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ test_that("tidy_plus_plus() works with fixest models", {
NA
)

mod <- fixest::feols(mpg ~ disp| cyl | wt ~ qsec, data = mtcars)
mod <- fixest::feols(mpg ~ disp | cyl | wt ~ qsec, data = mtcars)
expect_error(
res <- mod |> tidy_plus_plus(),
NA
Expand All @@ -706,12 +706,12 @@ test_that("tidy_plus_plus() works with fixest models", {
res <- mod |> tidy_plus_plus(instrumental_suffix = " (IV)")
expect_equivalent(res$var_label[res$term == "wt"], "wt (IV)")

mod <- fixest::feols(mpg ~ disp| 1 | factor(cyl) ~ qsec, data = mtcars)
mod <- fixest::feols(mpg ~ disp | 1 | factor(cyl) ~ qsec, data = mtcars)
expect_error(
res <- mod |> tidy_plus_plus(),
NA
)
expect_equal(nrow(res[res$instrumental,]), 3L)
expect_equal(nrow(res[res$instrumental, ]), 3L)
})

test_that("tidy_plus_plus() works with logitr models", {
Expand Down

0 comments on commit d427dd7

Please sign in to comment.