Skip to content

Commit 7b0c55b

Browse files
committed
Gate behind nonSemVerExperiments
1 parent 9296944 commit 7b0c55b

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

lib/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ export default async function loadCli() { // eslint-disable-line complexity
472472
});
473473
}
474474

475-
if (combined.observeRun) {
475+
if (combined.observeRun && experiments.observeRunsFromConfig) {
476476
combined.observeRun({
477477
events: asyncEventIteratorFromApi(api),
478478
});

lib/load-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {packageConfig, packageJsonPath} from 'pkg-conf';
88

99
const NO_SUCH_FILE = Symbol('no ava.config.js file');
1010
const MISSING_DEFAULT_EXPORT = Symbol('missing default export');
11-
const EXPERIMENTS = new Set();
11+
const EXPERIMENTS = new Set(['observeRunsFromConfig']);
1212

1313
const importConfig = async ({configFile, fileForErrorMessage}) => {
1414
const {default: config = MISSING_DEFAULT_EXPORT} = await import(url.pathToFileURL(configFile));

test/internal-events/fixtures/ava.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ export default {
66
files: [
77
'test.js',
88
],
9+
nonSemVerExperiments: {
10+
observeRunsFromConfig: true,
11+
},
912
async observeRun(run) {
1013
for await (const event of run.events) {
1114
internalEvents.push(event);

0 commit comments

Comments
 (0)