You can go nuts reading tutorials and books showing the most useless examples. Much like the classic OOP example using a car example to describe classes. It gives you the concept, but otherwise useless.
A Gherkin-snippet I found in an article:
When I create 5 widgets And I delete one widget Then I should see that one widget disappear And I should see that “4” widgets remain
I find this overly complex testing unless you’re specifically targeting animations and user experience.
When making a Meteor-app you can test for everything from access to z-index(A to Z… get it? ).
But writing those tests take far more time than they’re worth. Where do you draw the line and why?
In a client/consultant setting I totally see the whole cucumber/gherkin solution. Agree on the tests, make them pass. Job done.
When you make your own app or you work continuously for a company with an app, the picture is slightly different.
Sure, you can write tests to ensure the next guy doesn’t mess things up.
You can go bananas with Unit, E2E, Integration testing.
Or you can just completely avoid it and use manual testing.
I’m completely baffled by either my inability to find it, or the lack of resources as to what one should test in a node app instead of just how.
I’d like to know what and why. The internet is however very helpful as for the how!
Does anyone have any good resources? Either completely general, or directed at webapps/node.