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

TypeError: stackTrace.split is not a function #34

Closed
jackie-linz opened this issue Mar 22, 2023 · 2 comments · Fixed by #35
Closed

TypeError: stackTrace.split is not a function #34

jackie-linz opened this issue Mar 22, 2023 · 2 comments · Fixed by #35

Comments

@jackie-linz
Copy link
Contributor

jackie-linz commented Mar 22, 2023

Happens with PlayWrite test fails, where it can produce a CDATA body inside failure.

Minimal test result that can reproduce the error:

<testsuites name="jest tests" tests="1" failures="1" skipped="0" errors="0" time="0.849">
<testsuite name="libs/foo.spec.ts" timestamp="1679511632462" hostname="LRS:Chromium" tests="1" failures="1" skipped="0" time="144.328" errors="0">
<testcase name="Test suite failure" classname="libs/foo.spec.ts" time="19.34">
<failure message="libs/foo.spec.ts:38:5 Test suite failure" type="FAILURE">
<![CDATA[  [LRS:Chromium] › libs/foo.spec.ts:38:5 › Test suite failure 

    locator.click: Error: strict mode violation: locator('button:text("Email")') resolved to 2 elements:
        1) <button data-testid="first">Email</button> aka getByTestId('first')
        2) <button data-testid="second">Anoher Email</button> aka getByTestId('second')
]]>
</failure>
</testcase>
</testsuite>
</testsuites>

Failure seems to be caused by https://github.com/phoenix-actions/test-reporting/blob/main/src/utils/node-utils.ts#L8

@luke-rogers
Copy link

Running into the same issue using Cypress

@IanMoroney
Copy link
Contributor

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 a pull request may close this issue.

3 participants