Skip to content

Flutter testing args not considered for analysis before execution #5227

@gaaclarke

Description

@gaaclarke

description

When using the flutter test arguments to use a local engine (as noted in #5224) they work as long as the api hasn't changed. Changing the API can lead to situations where the tests cannot execute. For example: I switched a class from X extends Y to X implements Y and added a method to X, int foo => _value.foo;.

I was not able to execute the tests because if Y didn't have foo it would complain that it isn't implemented, if I added the declaration it would complain that X doesn't have a foo method.

It seems like VSCode is doing 2 different analyses:

  1. before we run the tests, that doesn't us the local engine arguments
  2. when executing the tests, that does use the local engine arguments

Executing the tests from the command line works which seems to indicate some extra step that VSCode is doing to analyse the code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions