3 ms·
Ideally imo you'd have a property based test that does the following: Perform some arbitrary list of valid actions. (This alone is valuable) Run the new migra
by IanCal 2y ago
Ideally imo you'd have a property based test that does the following:
Perform some arbitrary list of valid actions. (This alone is valuable)
Run the new migrations.
Perform some arbitrary list of valid actions.
Assert no crashes/errors.
I've found this great for testing APIs - just "perform some list of user actions and make sure things don't explode" can catch a lot.
- jononor 2y agoI have also found this kind of approach very valuable. With defensive code, where the code itself does a bit of the kind of correctness checking that one might conventionally put into tests, it works even better. Pre/post- conditions in functions for example.