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

🪲 fixed "Error: TypeError: Cannot read properties of undefined (readi… #247

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

uebelack
Copy link

@uebelack uebelack commented May 22, 2023

…ng 'split')" if failure element is empty

closes #159
closes #241

@j-catania j-catania added the bug Something isn't working label Dec 17, 2023
@j-catania
Copy link
Collaborator

@uebelack, could you please fix all CI and I will merge it.

Thanks for your help

@jozefizso jozefizso self-assigned this Dec 31, 2023
@jozefizso
Copy link
Collaborator

The bug with calling .split() on undefined object was fixed in #258.

We will add the new unit test from this PR, but the change in the getFirstNonEmptyLine() function is no longer necessary.

@jozefizso
Copy link
Collaborator

And the new report from jest in junit format test overwrites pulsar-test-results.md output file which is used by other test.

it('report from jest in junit format', async () => {
const fixturePath = path.join(__dirname, 'fixtures', 'external', 'java', 'test-report-jest.xml')
const trackedFilesPath = path.join(__dirname, 'fixtures', 'external', 'java', 'files.txt')
const outputPath = path.join(__dirname, '__outputs__', 'pulsar-test-results.md')
Copy link
Collaborator

Choose a reason for hiding this comment

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

The pulsar-test-results.md output file is used by another test.

@@ -19,6 +19,6 @@ export function parseIsoDate(str: string): Date {
}

export function getFirstNonEmptyLine(stackTrace: string): string | undefined {
const lines = stackTrace?.split(/\r?\n/g)
return lines?.find(str => !/^\s*$/.test(str))
const lines = stackTrace ? stackTrace.split(/\r?\n/g) : []
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change is no longer necessary - see #258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants