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

fix: title tests #61

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

backdround
Copy link
Contributor

@backdround backdround commented Nov 17, 2023

I tried to write tests for #60, but figured out that title tests don't work at all because remove_first_line removes the actual title line to test.

I can prove it without manual testing:
The occupied space by a month and a day in CURRENT_DATE changes every month (/day), and the count of spaces for padding in the title should change too from time to time. If it worked as expected, it would fail, at least in some short months (June / July).

Here I use Regex to work around this problem.

I didn't sort out how I can add more information "why the test has failed", so I did it by @error

There is how it looks like:
image

I hope there is another way to give a fail context

@backdround backdround changed the title fix: description tests fix: title tests Nov 17, 2023
@kdheepak
Copy link
Owner

Ah, okay don't worry about it! I'll look into this and add a test for it when I get the chance, and update this PR.

I merged your other PR! Thanks for that PR and for adding tests in this PR.

@kdheepak kdheepak marked this pull request as draft November 18, 2023 16:10
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.

2 participants