Jest tests are basically like Jasmine/Karma tests except that the "it" leading a test is "test" instead of "it" unless you explicitly use "it" which will work too. There is also the concept of snapshot testing. If a snapshot of a component does not exist you may make one which is some sort of blob of data. Going forward, you may compare the blob created in a test to an existing blob to see if the component (including the template) changed (unexpectedly). There is a command (using the U keyboard key) to update snapshots if you are expecting change instead of being wary of it. This snapshot comparison stuff isn't particularly "code first" but that doesn't mean it is bad either.
No comments:
Post a Comment