Hi guys,
I have been working on a personal website application over the last few months. I wanted to ask about Javascript unit and integration testing. What is the standard in the industry in 2019 for automated tests targeting Javascript?
Is it worth unit and integration testing Javascript functions? What are the best tools to achieve this in a .NET Core stack?
I have been developing an Asp.net Core 2.2 Razor pages application.
Just a few thoughts...
There's a pretty good presentation over at
medium.com/welldone-software/an-overview-of-javas…
With the Selenium IDE ( seleniumhq.org/selenium-ide ) incorporated to verify page state, the prescriptions of that article offer reasonably complete coverage.
I would add the specific concept of Regression Testing. Regression Tests verify that stuff that used to work STILL works. Nicely enough, as long as you don't throw out any of your old tests (except the ones that no long apply) your test suite already holds your regression tests. I recommend layering test by date; this has documentary value by way of indicating WHEN the test became relevant. Additionally, when retiring a test don't delete it, comment it out and remark on WHY it is no longer pertinent. This helps to document the evolution of the app (AND, if the app reverts, the test can easily be reactivated).
JomanWilland
SEO
I have been developing with Javascript for 2 years and I have tried several unit test frameworks. Prefer mochajs with javaScript datatable library It is the best one I ever used. It can be super extended with custom and already existing plugins