When writing tests for my ExpressJS application, sometimes it would be helpful to review the returned HTML in a local browser (just for creating the test, not for running it later).
I could save the snippet to a local temp file and use a npm module like opener to open it in a web browser. However don't want to reinvent the wheel, so maybe there already is a module out there for that use case, which may be even smarter (I remember writing test for Ruby on Rails with Capybara. There was a save_and_open_page() method that even fixed links to images, styles, etc..).
Aucun commentaire:
Enregistrer un commentaire