Thin wrapper around ensemble_test_runner. Splices a temporary dev dependency at the app's ensemble: git ref, runs tests, restores pubspec.yaml.
ensemble test [--project <path>] [runner flags...]- Run from starter root or
ensemble/apps/<app>(not subdirs). From an app dir, starter root is 2 parents up (apps→ensemble→ starter). --projectsets starter root explicitly. All other flags pass through (--timeout=,--verbose,--doctor, etc.).- Uses
fvm dartwhen.fvmrcexists. Requires Flutter ≥ 3.35 and ensemble ≥ v1.2.47 (test runner shipped in v1.2.47).
test.ts
├── starterProject.ts starter root or ensemble/apps/<app>
├── pubspecTestRunner.ts splice/restore test runner at app's ensemble ref
└── dartToolchain.ts fvm dart when .fvmrc exists
sequenceDiagram
participant CLI
participant Runner as ensemble_test_runner
CLI->>CLI: read ensemble git ref from pubspec
CLI->>CLI: backup pubspec, splice dev_dep if missing
CLI->>Runner: dart run ensemble_test_runner:ensemble_test [flags]
Note over Runner: resolves deps if needed
Runner-->>CLI: exit code
CLI->>CLI: restore pubspec in finally
| Module | Role |
|---|---|
starterProject.ts |
Resolve starter root from cwd or 2 parents up from ensemble/apps/<app> |
pubspecTestRunner.ts |
Splice test runner at app's ensemble: ref (min v1.2.47); restore in finally |
dartToolchain.ts |
fvm dart vs dart |
Not duplicated in CLI: test discovery, asset patching, flutter test, doctor/validate — owned by the runtime package.