Skip to content

Commit aaa1202

Browse files
committed
simplify blackbox configuration
1 parent 53eb96e commit aaa1202

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

‎blackbox.php‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@
1010
};
1111

1212
Application::new($argv)
13-
->when(
14-
\getenv('ENABLE_COVERAGE') !== false,
15-
static fn(Application $app) => $app
16-
->scenariiPerProof(1)
13+
->map(static fn($app) => match (\getenv('BLACKBOX_ENV')) {
14+
'coverage' => $app
1715
->codeCoverage(
1816
CodeCoverage::of(
1917
__DIR__.'/src/',
2018
__DIR__.'/proofs/',
2119
)
22-
->dumpTo('coverage.clover')
23-
->enableWhen(true),
24-
),
25-
)
20+
->dumpTo('coverage.clover'),
21+
)
22+
->scenariiPerProof(1),
23+
default => $app,
24+
})
2625
->tryToProve(Load::everythingIn(__DIR__.'/proofs/'))
2726
->exit();

0 commit comments

Comments
 (0)