Testing JavaScript
As shinytest has been deprecated as it was based on PhantomJS, we are going to use the shinytest2 based on the chromote package and Google Chrome (Chromium) browser to reproduce the example of the chapter.
Limitations:
- This technique is slower than the other approaches.
- Only test the outside of the app can be tested.
- Visual tests are best run by one person on their local computer as it’s hard to get different computers to generate pixel-reproducible screenshots.
If you are facing problems testing your app as it needs wait until the complition of some CSS animations, you can use the selenider packages as it will automatically wait for your code to work.