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

Updated tests #684

Draft
wants to merge 12 commits into
base: main-enterprise
Choose a base branch
from
Draft

Updated tests #684

wants to merge 12 commits into from

Conversation

Gramatus
Copy link

@Gramatus Gramatus commented Sep 15, 2024

This is so far a WiP, but I am trying to see if I can get those tests that are currently skipped to work.

I have managed to run all the tests in index.test.js, branches.test.js and milestones.test.js, but I am not completely certain that all the tests actually checks what they should. I will try to look into that later. I believe this is still a good way towards better testing.

One important thing to note is that I added title to MergeDeep.NAME_FIELDS in order to make milestones work. I am not sure if this might have unintended consequences, and would be happy if someone else has any insights into that.

I also added a few JSDoc types (for my own understanding of the code), hopefully that is not a problem.

Finally, I fixed a few places where I believe the logging was wrong (see 6f205c3).

These were added as part of understanding the code, commiting in case they might be useful for others as well.
This is what probot actually uses to identify the org, so it should probably be there in the fixture.
When `sender.type` is bot, the change is skipped. This led to the test checking for changes on this event failing.
This seems to me to be the best way for logs to show up in a useful fashion when running tests.
This is needed for the test to be able to check that it was called.
Also adds support for ovveriding the filter list in `Diffable.sync`.
This is needed for milestones to work correctly. However, it should be tested well to ensure it does not break anything else.
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.

1 participant