-
Notifications
You must be signed in to change notification settings - Fork 224
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
Run a Codeshift to move away from the custom test runner #1274
base: main
Are you sure you want to change the base?
Conversation
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.
Here is the script for renaming the files to end with .test.ts
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.
Here is my script for running the Codeshift (warning its actually terrible but whatever)
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.
Adding a vitest configuration file for adding the custom matcher
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.
File for adding custom matchers, which includes .toMatchStructError
The old test runner would check for a failure, and check that the StructError
gave the right failures but also that the StructError
's properties (only the FILTERED_PROPS
ones) matched the first Failure
returned by the failures generator on the StructError
Related: #1244
This PR does a few things to the testing suite:
test
.StructError
s, since there is extra logic on comparingStructError
s in the old test runner and its worth not redefining that check everywhere.In a follow up I'd like to move all the tests into one file per struct, but that can be done by hand later.