Skip to content

🏗 Flag an error and exit when Karma runs zero tests#34040

Merged
rsimha merged 5 commits intoampproject:mainfrom
rsimha:2021-04-27-ZeroTests
Apr 27, 2021
Merged

🏗 Flag an error and exit when Karma runs zero tests#34040
rsimha merged 5 commits intoampproject:mainfrom
rsimha:2021-04-27-ZeroTests

Conversation

@rsimha
Copy link
Copy Markdown
Contributor

@rsimha rsimha commented Apr 27, 2021

Back in the days of karma-browserify, a result with zero tests was an occasional transitional condition and wasn't flagged as a fatal error. See #16851 and #24957.

Now, with karma-esbuild, transformation errors can result in zero tests, and it must be flagged as a fatal error. This PR surfaces silent failures like the one in #33418 (comment).

A more correct fix would be to get karma-esbuild to throw an error when it encounters errors like the ones in #34020 (comment).

@rsimha rsimha requested review from jridgewell and samouri April 27, 2021 19:13
@rsimha rsimha self-assigned this Apr 27, 2021
@rsimha rsimha changed the title 🏗 Throw an error when Karma runs zero tests 🏗 Flag an error and exit when Karma runs zero tests Apr 27, 2021
@rsimha rsimha merged commit b4159da into ampproject:main Apr 27, 2021
@rsimha rsimha deleted the 2021-04-27-ZeroTests branch April 27, 2021 22:50
rochapablo pushed a commit to rochapablo/amphtml that referenced this pull request Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants