whs.js icon indicating copy to clipboard operation
whs.js copied to clipboard

Spec/tests closer to src code

Open hirako2000 opened this issue 8 years ago • 5 comments

Ideally the tests should be closer to the src code.

Why? Incentive to test the code. Not having to search for where existing specs are etc. If not possible/difficult with our current setup, let's at least bring structure to the specs we have in the test folder.

Or discuss. what we have right now is far from ideal.

Version:
  • [x] v2.x.x
  • [ ] v1.x.x
Issue type:
  • [ ] Bug
  • [ ] Proposal/Enhancement
  • [ ] Question
  • [x] Discussion

Tested on:
Desktop
  • [ ] Chrome
  • [ ] Chrome Canary
  • [ ] Chrome dev-channel
  • [ ] Firefox
  • [ ] Opera
  • [ ] Microsoft IE
  • [ ] Microsoft Edge
Android
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Opera
IOS
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Opera

hirako2000 avatar Mar 22 '17 20:03 hirako2000

so can use jest style? with __spec__ (or similar) folder alongside code

thejmazz avatar Mar 23 '17 14:03 thejmazz

@thejmazz We discussed. I suggest having tests in src folder like Component.spec.js. That way we can easily see which tests need to be done

sasha240100 avatar Mar 23 '17 14:03 sasha240100

I think @thejmazz is correct. We can bring it closer to the src, but with that test and mock pattern.

hirako2000 avatar Mar 30 '17 13:03 hirako2000

@sasha240100 can you check the async change I made, and merge?

hirako2000 avatar Apr 08 '17 10:04 hirako2000

@hirako2000 Yes, where to merge?

sasha240100 avatar Apr 08 '17 10:04 sasha240100