Skip to content

Commit 4d167d5

Browse files
author
DavertMik
committed
added env variable config
1 parent 09d39ae commit 4d167d5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/listener/emptyRun.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ module.exports = function () {
4747
output.print(output.styles.bold('npx codeceptjs run --debug --grep "' + results[0].item + '"'))
4848
}
4949
}
50-
if (process.env.CI) {
50+
if (process.env.CI && !process.env.DONT_FAIL_ON_EMPTY_RUN) {
5151
output.print()
52-
output.error('No tests were executed. Failing on CI')
52+
output.error('No tests were executed. Failing on CI to avoid false positives')
53+
output.error('To disable this check, set `DONT_FAIL_ON_EMPTY_RUN` environment variable to true in CI config')
5354
process.exitCode = 1
5455
}
5556
}

0 commit comments

Comments
 (0)