Skip to content

Conversation

@jonthegeek
Copy link

This adds a couple simple tests to make sure virtualSelectInput initializes and passes its values to Shiny. It catches the issues that was introduced in shiny v1.11.0 (and will be fixed in shiny v1.11.1).

I pinned shiny to v1.10.0 in the DESCRIPTION until they push 1.11.1. Parts of this test fail with 1.11.0 (which is most of the point of this test!).

Note: It generates pngs as part of the tests, but it doesn't actually check those images. I generally recommend looking at them visually (if they change when you run tests locally) to make sure you don't see anything weird (via testthat::snapshot_review(), and then accept them if they look fine), but the json side is the real test.

This is a first example. Most of this package likely could/should be tested this way, but I recommend working out virtualSelectInput() completely before implementing tests for other inputs.

I pinned shiny to v1.10.0 until they push 1.11.1. This test fails with 1.11.0 (which is most of the point of this test!).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant