dart-lang / test

A library for writing unit tests in Dart.
https://pub.dev/packages/test
490 stars 213 forks source link

Let me provide -D "environment" variables for browser tests in the command line #283

Open kevmoo opened 9 years ago

kevmoo commented 9 years ago

For content-shell and Dartium: pipe them in at runtime For js output: provide the to dart2js

Scenario: I'm hitting scenarios where I need to provide runtime configuration – specifically secrets – when testing on a CI server.

nex3 commented 9 years ago

I'd rather not support this for some platforms without supporting it for all of them, so for now I'm marking it as blocked on dart-lang/sdk#23799.

zoechi commented 9 years ago

23799 is great but -D arguments for dart2js aren't system environment variables but rather build settings which can be used in code like String.fromEnvironment('SOME_SETTING') instead of io. Platform.environment['SOME_VAR'] AFAIR.

nex3 commented 9 years ago

@zoechi I'm aware of that; dart-lang/sdk#23799 is referring to those.