Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Replacing karma+mocha with jest+enzyme. #4162
Motivation and Context
This change is:
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
referenced this pull request
Sep 19, 2017
This looks good to me and I think it can come in handy in some cases, good work!
The only thing I would change is the placement of tests. I think having another top level folder with the whole tree structure for tests is a bit annoying, specially in JS, where the IDE only helps you so much. Editing a test would require jumping on the tree, and moving a file would require moving the test as well, recreating folders and so on as you go. I don't know about others, but I will most likely forget about it and the tests tree will probably end up in an inconsistent state.
Did you consider putting the test file along the code is testing? We do that for styles now and I think it works quite well. Here I represent both ways with a couple of trees, in case I didn't make my point clear.
Current folder structure:
Having both tests and source in the same level:
Any opinions on this?
Great to hear that you prefer putting it next to the SUT, because this is actually a best practice in JS/jest-world. I hesitated from doing this, because I actually thought people would expect a directory layout that is consistent with our Java code base (separate