Shinytest breaks when a date input is set to nothing
Info
Using shinytest::recordTest() with an app with a date input and then setting that date input to empty by simply erasing the date string with the delete key will break the test when it tries to run. The error message is:
Listening on http://127.0.0.1:3397
C> Loading required package: shiny
C> Running application in test mode.
C>
C> Listening on http://127.0.0.1:5259
Saved test code to /Users/nick/Desktop/break_date_input/tests/mytest.R
Running mytest.R Error in session_makeRequest(self, private, endpoint, data, params, headers) :
undefined is not a constructor (evaluating 'e.replace(/-/g,"/")')
Summary
Shinytest breaks when a date input is set to nothing
Info
Using
shinytest::recordTest()
with an app with a date input and then setting that date input to empty by simply erasing the date string with the delete key will break the test when it tries to run. The error message is:To reproduce
app.R
: Basic app with a date inputmytest.R
: Generated test script from runningshinytest::recordTest()
and then erasing date and taking a snapshot.