invent-ed / devleague--behavior-driven-shopping-list

BDD Client Side Shopping List
0 stars 0 forks source link

add more test cases for ShoppingListItem .render() #14

Open theRemix opened 7 years ago

theRemix commented 7 years ago

add more test specs when the user

around : https://github.com/edsperanto/devleague--behavior-driven-shopping-list/blob/master/js/shopping_list_item_test.js#L44

invent-ed commented 7 years ago

fixed

theRemix commented 7 years ago

@edsperanto which commit fixes this?

i still see just one spec that asserts one case. the issue asks for more (additional) specs

invent-ed commented 7 years ago

sorry forgot to git push, just pushed my repo

theRemix commented 7 years ago

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.