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: handling of AssertionResult.failureDetails #13

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

an-ky
Copy link
Contributor

@an-ky an-ky commented Jun 10, 2024

Append AssertionResult.failureDetails to CtrfTest.trace when setting .trace and .message attributes from the AssertionResult to prevent overwriting .trace when AssertionResult.failureDetails is set.

Append AssertionResult.failureDetails to CtrfTest.trace when setting
.trace and .message attributes from the AssertionResult to prevent
overwriting .trace when AssertionResult.failureDetails is set.
@an-ky an-ky force-pushed the fix/handle-failureDetails branch from 3508c94 to ca7b9f3 Compare June 10, 2024 22:17
@@ -184,7 +185,7 @@ class GenerateCtrfReport implements Reporter {
}

if (testResult.failureDetails !== undefined) {
failureDetails.trace = testResult.failureMessages.join('\r\n')
failureDetails.trace = failureDetails.trace?.concat('\n\n', testResult.failureDetails.join('\n'))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Originally, failureMessage was assigned to trace. Was this intended?
And is it possible to just join failureDetails which is Array<unknown>. I don't know how to handle this properly

@Ma11hewThomas Ma11hewThomas self-assigned this Jun 11, 2024
@Ma11hewThomas Ma11hewThomas merged commit aec0f8c into ctrf-io:main Jun 11, 2024
1 check passed
@Ma11hewThomas
Copy link
Collaborator

Thanks for your contribution, published v0.0.9

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