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

fix: avoid returning failureMessages: [undefined] #76

Merged
merged 3 commits into from May 15, 2022
Merged

fix: avoid returning failureMessages: [undefined] #76

merged 3 commits into from May 15, 2022

Conversation

mrazauskas
Copy link
Contributor

From jestjs/jest#12839 (comment)

Fixing the logic to avoid returning failureMessages: [undefined]. The type of failureMessage is Array<string>, here implementation was incorrect.

For instance, all is good in create-jest-runner, because of types – https://github.com/jest-community/create-jest-runner/blob/69558d1bb03cfd3b9080ef7b8714ba17ff3c48cb/lib/toTestResult.ts#L56

Might be useful to have more type safety in this library, but to add a build step is somewhat too much. Or?

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

a test?

and adding type checking seems a bit much, but maybe we can add jsdoc and use checkJs?

Object {
"ancestorTitles": Array [],
"duration": 1200,
"failureMessages": Array [],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fails here on main (;

@SimenB SimenB merged commit 05f8f8f into jest-community:main May 15, 2022
@mrazauskas mrazauskas deleted the fix-failureMessages branch May 15, 2022 10:31
@SimenB
Copy link
Member

SimenB commented May 15, 2022

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