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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: jest 26 #1731

Conversation

ChristianMurphy
Copy link
Member

Checklist
Description of change

Updates jest to version 26, refactors async tests to use async await.
https://jestjs.io/blog/2020/05/05/jest-26

馃摀 ts-jest 25 appears to work for oEQs Jest 26 needs, a version that officially supports Jest 26 is in the works kulshekhar/ts-jest#1595

@ChristianMurphy ChristianMurphy requested a review from a team May 13, 2020 21:05
@edalex-ian
Copy link
Member

When I setup the REST Client and got the warning about this I decided to avoid it and wait - err on the side of caution. However, from looking at the ts-jest repo and milestones it looks as though it should be released in the next day or so / by end of the week.

Unfortunately the REST Client tests are not yet part of the CI, so I'll need to pull this branch and run them manually to make sure everything is still happy there too.

@edalex-ian
Copy link
Member

edalex-ian commented May 17, 2020

ts-jest 26 is now out: https://www.npmjs.com/package/ts-jest/v/26.0.0

In the rush to get the other code done I forgot to go back to this. But I guess now we can just update both and be done with it. :)

@ChristianMurphy
Copy link
Member Author

Thanks for the ping @edalex-ian, rebased and updated ts-jest

Copy link
Member

@edalex-ian edalex-ian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! And the REST Client tests still run happy after the async/await updates.

Am I correct in thinking that using them in the Jest calls removes the need to do things like expect.assertions(x)?

@ChristianMurphy
Copy link
Member Author

@edalex-ian it should and to be extra sure, added eslint-plugin-jest to verify this, and addressed the errors in 5aa6b9a

@ChristianMurphy ChristianMurphy merged commit cd50e38 into openequella:component/search_configuration May 19, 2020
@ChristianMurphy ChristianMurphy deleted the test/jest-26 branch May 19, 2020 14:53
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.

None yet

2 participants