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

Convert from ava tests to jest #314

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

jamonholmgren
Copy link
Member

@jamonholmgren jamonholmgren commented Jul 4, 2023

I used flame and GPT-4 to convert the test code base from ava to jest.

Full explanation in the YouTube video I made about it!

https://www.youtube.com/watch?v=p2mO1JiF-7U

Copy link
Member

@robinheinze robinheinze left a comment

Choose a reason for hiding this comment

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

Really impressive how well it did. Just a couple small things to fix.

test/async-response-transform.test.js Outdated Show resolved Hide resolved
test/config.test.js Outdated Show resolved Hide resolved
test/monitor.test.js Outdated Show resolved Hide resolved
test/async-request-transform.test.js Outdated Show resolved Hide resolved
test/async-request-transform.test.js Outdated Show resolved Hide resolved
test/cancellation.test.js Outdated Show resolved Hide resolved
test/cancellation.test.js Outdated Show resolved Hide resolved
This commit addresses feedback on the test files. It removes explicit imports of globals in all test files for consistency. It also strengthens the assertions in the tests by replacing .toBeTruthy() and .toBeFalsy() with .toBe(true) and .toBe(false) respectively. Additionally, a test in test/cancellation.test.js has been converted to use async/await for better readability and understanding.
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