golem icon indicating copy to clipboard operation
golem copied to clipboard

Encapsulate `testServer()` in `test_that()` for module unit tests

Open statnmap opened this issue 4 years ago • 1 comments

Add test_that("mod works", {}) around here, so that tests are recognized as is by {testthat}
https://github.com/ThinkR-open/golem/blob/b62587cd5c14a714098e68b4945dd72877f2670d/R/modules_fn.R#L275

statnmap avatar Oct 18 '21 10:10 statnmap

As far as I can tell, this is not required:

  • 5 tests in the test file, 5 in the {testthat} output
  • 100% code coverage

Screenshot 2021-11-19 at 11 51 14

This might have some corner cases for when you need the tests to be inside a context.

I'm putting this on hold for now until further exploration can be done

ColinFay avatar Nov 19 '21 10:11 ColinFay