Skip to content

Cannot access environment on dart test #1794

@mnordine

Description

@mnordine
void main() {
  print(const bool.hasEnvironment('blah'));
}

dart -Dblah=true test outputs:

false
No tests were found.

It seems like the environment does not exist when you run dart test

Dart SDK 2.18.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions