-
Notifications
You must be signed in to change notification settings - Fork 61
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
Unit tests for filters #940
Conversation
I have noticed that prettier only fails on .ts files ... any advice? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good dont worry about the prettier issues I can figure that out for you
frontend/app/yarn.lock
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you can remove the new yarn.lock from the diff, you can do this by typing
git checkout -- frontend/app/yarn.lock
git add frontend/app/yarn.lock
git commit -m "fix: yarn.lock"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran these commands, not sure it fixed the issue though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops sorry meant git checkout origin/master -- frontend/app/yarn.lock
describe('bountyHeaderLanguageFilter', () => { | ||
test('match', () => { | ||
expect(bountyHeaderLanguageFilter(['Javascript', 'Python'], { Javascript: true })).toEqual( | ||
true | ||
); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this should be false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is that? Do struct values not compare with strings? This could be highlighting a problem I've been facing where none of the language filters work for me.
test('a/t/t', () => { | ||
expect(bountyHeaderFilter({ Assigned: true }, true, true)).toEqual(true); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this should be false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure because even if it's been paid, it's still assigned.
not sure why the craco tests are failing too but don't worry about those either I can deal with them just focus on getting the jest tests to work, let me know if you come across any new blockers |
It looked like craco was running the same tests as jest |
@kevkevinpal any idea why this test is failing?
|
15a8c28
to
3cf3441
Compare
* update user roles update window * final tweaks * syncing with origin * added filterValidation tests * finished tests for bountyHeaderLanguageFilter, bountyHeaderFilter functions * prettier * bug fix * fixed a/t/t test * test: fixed test to pass * fix: no new yarn.lock --------- Co-authored-by: kevkevin <[email protected]>
Describe your changes
Implemented the following unit tests:
Issue ticket number and link
closes: #901
Type of change
New feature (non-breaking change which adds functionality)
Checklist before requesting a review