summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2019-08-19 11:13:42 +0000
committerWinnie Hellmann <winnie@gitlab.com>2019-08-21 10:12:10 +0200
commitc1f42701ae962902c24423f67028157faf7236ad (patch)
treea523b93dceaf85b7c6f668ff33c486fcd560c2b2
parent006bc124366078d717ea8a331fdfd1e2ccd3476f (diff)
downloadgitlab-ce-winh-jest-require-assertions.tar.gz
Make sure that each Jest test contains an assertionwinh-jest-require-assertions
-rw-r--r--spec/frontend/test_setup.js6
1 files changed, 6 insertions, 0 deletions
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();
+});