Skip to content

"Cannot read properties of null (reading 'startsWith')" running tests #5930

@DanTup

Description

@DanTup

Running test\src\services\correction\fix\add_static_test.dart with F5 in VS Code, I see this error:

Image

In this code:

const path = maybeUriToFilePath(useRootLocation ? evt.test.root_url : evt.test.url);

It appears that evt.test.root_url is undefined but evt.test.url is null, and maybeUriToFilePath handles undefined but not null.

{"seq":2273,"type":"event","body":{"test":{"id":5,"name":"AddStaticTest test_multipleFields","suiteID":0,"groupIDs":[2,3],"metadata":{"skip":true,"skipReason":"does not have \"solo\""},"line":null,"column":null,"url":null},"type":"testStart","time":1055},"event":"dart.testNotification"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    in testingRelates to test execution of Dart/Flutter tests for end usersis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions