-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: support slowTestThreshold
option
#78
feat: support slowTestThreshold
option
#78
Conversation
jest.mock('../formatter.js'); | ||
|
||
jest.mocked(formatTsdResults).mockReturnValue('<mocked failure message>'); |
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.
This is a workaround, can’t use module factory because of jestjs/jest#12422. All mock
types is a joy to work with, so I’m fine with that little trade off.
ancestorTitles: [], | ||
failureDetails: [], | ||
failureMessages: errorMessage ? [errorMessage] : [], | ||
fullName: TEST_TITLE, |
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.
Currently fullName
is set to absolute path of the test file. Not sure if this is a breaking change, or just a fix?
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.
seems fine - we expose the filename via testFilePath
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.
love it 👍
Just could not stop myself – added support for
slowTestThreshold
option.Had to rewrite the logic, but that is even better after types were added. I mean, in some files there are more types than code. After refactor all is much cleaner.