Roblox / testez

BDD-style test and assertion library for Roblox Lua
https://roblox.github.io/testez/
Apache License 2.0
185 stars 58 forks source link

Handle multiple it blocks with the same description #93

Closed MagiMaster closed 4 years ago

MagiMaster commented 4 years ago

Right now, the final it block will overwrite the rest. This should either run all tests anyway, or fail the tests. Until we've verified that no current tests do this, we might need to make it a warning though.

amoss-roblox commented 4 years ago

I don't think it should run the duplicates anyway as this would be likely to confuse any report consumer (and person running the tests!). I'm supportive of an error or at least a warning.

MagiMaster commented 4 years ago

I want to disagree with you in favor of allowing a wider variety of use cases, but really I can't think of a good reason to duplicate it block descriptions. Making this an error is probably the right way to go. Also, I agree that it would confuse the person who had to figure out which of the dozen tests actually failed.