Answer the question
In order to leave comments, you need to log in
TDD (tests) for HTML in JavsScript?
Hello! :)
I'm making an MVC application using ExpressJs.
How to do TDD (tests) for the client side (HTML)?
For example: test submitting a form. It is not correct to fill out the form 1000 times a day by hand. Log in manually every time.
PS TDD server side - everything is clear (making an HTTP request, parsing the response)
Thank you in advance for the answers, links, libraries :)
Answer the question
In order to leave comments, you need to log in
There are two options: either unit tests or e2e.
With unit tests, everything is generally exactly the same. From the tests, we launch the application instance, make an http request, get a response and check that everything is in place there. Do not forget to kill the application in teardown. In order not to reinvent the wheel, you can take supertest .
e2e tests perform a more general check that certain user scenarios pass without problems. Here you need to look towards Nightwatch and TestCafe .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question