-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unit tests duplicated in parse_org.unit.test.js #309
Conversation
There were a bunch of tests identically or near identically duplicated between parse_org.unit.test.js and OrgFile.unit.test.js, so remove them from one of the two files. The former seems to be a more specific and low-level set of tests; based on the file name presumably it's the best place for testing parseOrg(), but probably less suitable for tests which also exercise exportOrg().
Right, Looks like (at least some of) these dups were introduced during refactoring by commit 7c966b2 Thanks for the clean-up! It's hard to review for me so I hope you deleted tests very carefully :) |
Yes, I was very careful - but this is no guarantee of anything ;-) |
Ok, so we already have the first merge conflict on this PR. It's time to tackle it for good. @aspiers You've put a lot of time into it! I just spent close to an hour just to sanity check the changes. It's very finicky work, because it would be sad to lose good tests. Having duplicate tests isn't good at all, either.
I agree. I tried to move the tests right now, but it's 10pm and it's beyond me. I'm afraid if we leave this open too long, we'll have more merge conflicts. Hence, after this second checkup that all is good (and all was good, great work aspiers! 🙏), I'm merging this. Imo it's preferable to have tests in arguably slightly off namespaces than to have redundant tests. Thanks for the extra effort on the code and the discussion here! |
There were a bunch of tests identically or near identically duplicated between
parse_org.unit.test.js
andOrgFile.unit.test.js
, so remove them from one of the two files. The former seems to be a more specific and low-level set of tests; based on the file name presumably it's the best place for testingparseOrg()
, but probably less suitable for tests which also exerciseexportOrg()
.