Skip to content
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

Merged
merged 4 commits into from
Jun 9, 2020

Conversation

aspiers
Copy link

@aspiers aspiers commented May 30, 2020

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().

Adam Spiers added 2 commits May 30, 2020 18:58
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().
@schoettl
Copy link
Collaborator

Right, parse_org.unit.test.js is for tests of functions in parse_org.js. The other unit tests are higher-level to test parse + export.

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 :)

@aspiers
Copy link
Author

aspiers commented May 30, 2020

Yes, I was very careful - but this is no guarantee of anything ;-)

@munen
Copy link
Collaborator

munen commented Jun 9, 2020

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.

Personally I would be more inclined to merge this and then move the tests around as you see fit. But it's your call.

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!

@munen munen merged commit 7ca292a into 200ok-ch:master Jun 9, 2020
@aspiers aspiers deleted the rm-dup-tests branch June 9, 2020 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants