js-dxtools / webpack-validator

Validates your webpack config with Joi
MIT License
295 stars 29 forks source link

test: improve testing utils #96

Closed jonathanglasmeyer closed 8 years ago

jonathanglasmeyer commented 8 years ago

This is inspired by a comment from @bebraw asking why we need those "#<number" comments all over the place. The reason for this is that the test utils allValid and allInvalid create test case descriptions (it("...")) by using the array index of the given case. In order to find a failing test case, the comments would be necessary. It's kinda awkward. So what about the putting the whole stringified config slice into the test description, like this: better-test-failures

What do you think? I'd like this as it's cumbersome to shift test cases around, forcing you to change the numbering each time. This implementation is much clearer I think. If you like it, i'll remove the number comments before we merge this PR.

kentcdodds commented 8 years ago

LGTM!

jonathanglasmeyer commented 8 years ago

Cool, i'll remove the comments then.

codecov-io commented 8 years ago

Current coverage is 100%

Merging #96 into master will not change coverage

@@           master   #96   diff @@
===================================
  Files          18    18          
  Lines         121   121          
  Methods         0     0          
  Messages        0     0          
  Branches        0     0          
===================================
  Hits          121   121          
  Misses          0     0          
  Partials        0     0          

Powered by Codecov. Last updated by d16c417...8580b70

jonathanglasmeyer commented 8 years ago

Done.