Open theRemix opened 7 years ago
fixed
@edsperanto which commit fixes this?
i still see just one spec that asserts one case. the issue asks for more (additional) specs
sorry forgot to git push, just pushed my repo
actually, the it()
blocks have been re-used.
it is better practice to have each it()
test just one thing, then add more it()
(specs) for additional cases.
refactor this so that checking if myItem.is_done is false, and checking the output of .render()ing after setting is_done is what you expect, separately.
the key here is isolation. if a test fails, you'd want to report which single error caused the failure.
add more test specs when the user
is_done
to true, assert the desired output fromrender()
is what you expectis_done
to true, setis_done
to false, assert the desired output fromrender()
is what you expectaround : https://github.com/edsperanto/devleague--behavior-driven-shopping-list/blob/master/js/shopping_list_item_test.js#L44