Skip to content

Unexpected failure when parsing test results from stable Dart SDK #113

@aaronlademann-wf

Description

@aaronlademann-wf

Hi there!

I noticed today that the following line is possible in test-results.json within a Dart unit test results output:

{"testID":1,"messageType":"print","message":"Consider enabling the flag chain-stack-traces to receive more detailed exceptions.\nFor example, 'pub run test --chain-stack-traces'.","type":"print","time":65561}

The presence of this line - specifically - a line with "messageType":"print" causes this action to throw:

Error: Cannot read property 'print' of undefined

Screen Shot 2021-05-12 at 2 20 56 PM


In this case, I was able to overcome the issue by enabling the chain-stack-traces flag in my test command - but I would imagine that this same error will occur if a user places a print() statement within a test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions