onepub-dev / dcli

An extensive library and tooling for building console/cli applications and scripts using the Dart programming language.
242 stars 28 forks source link

DartProject.current doesn't work within a unit test. #136

Open bsutton opened 3 years ago

bsutton commented 3 years ago

The problem is that DartProject.current first calls Script.current.

When we are running in a unit test Script.current returns 'test.dart' which results in a bogus DartProject.

Need to review how we detect the project as we have several different operation modes:

From local source Compiled script Running under a unit test.