Skip to content
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

bad unit tests #1042

Closed
chlebowa opened this issue Jan 11, 2024 · 0 comments · Fixed by #1067
Closed

bad unit tests #1042

chlebowa opened this issue Jan 11, 2024 · 0 comments · Fixed by #1067
Assignees
Labels
core good first issue Good for newcomers

Comments

@chlebowa
Copy link
Contributor

testthat::test_that("init throws when data has no datanames", {
  testthat::expect_error(
    init(data = teal_data(), modules = list(example_module())),
    "`data` object has no datanames and its environment is empty"
  )
})

This runs

td <- within(teal_data(), i <- iris)
init(data = td, modules = example_module()) %>% runApp

The test passes because there is no data.

Defaulting datanames to teal_data@env contents has made things somewhat confusing.

Amend error message and unit test.

@chlebowa chlebowa added good first issue Good for newcomers core labels Jan 11, 2024
@donyunardi donyunardi mentioned this issue Jan 11, 2024
36 tasks
@m7pr m7pr assigned m7pr and unassigned m7pr Jan 18, 2024
@vedhav vedhav self-assigned this Jan 24, 2024
vedhav added a commit that referenced this issue Jan 24, 2024
Closes #1042

---------

Signed-off-by: Vedha Viyash <49812166+vedhav@users.noreply.github.com>
@vedhav vedhav closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants