From c1f42701ae962902c24423f67028157faf7236ad Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Mon, 19 Aug 2019 11:13:42 +0000 Subject: Make sure that each Jest test contains an assertion --- spec/frontend/test_setup.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spec/frontend/test_setup.js') diff --git a/spec/frontend/test_setup.js b/spec/frontend/test_setup.js index df8a625319b..d52aeb1fe6b 100644 --- a/spec/frontend/test_setup.js +++ b/spec/frontend/test_setup.js @@ -93,3 +93,9 @@ Object.assign(global, { clearTimeout(id); }, }); + +// make sure that each test actually tests something +// see https://jestjs.io/docs/en/expect#expecthasassertions +beforeEach(() => { + expect.hasAssertions(); +}); -- cgit v1.2.1