summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2019-08-21 18:20:09 +0000
committerMike Greiling <mike@pixelcog.com>2019-08-21 18:20:09 +0000
commit4cdd18e84ade89d7c8846e4b75a730140e286e8b (patch)
treee540c513a400f373d66a97aa3bc4da609ac8ddb2
parent4a772d50ab7caaa7cb85580a7059c1e45a582db5 (diff)
parentd0e53f1aca212e36a741fc8870579a39054c1b7a (diff)
downloadgitlab-ce-4cdd18e84ade89d7c8846e4b75a730140e286e8b.tar.gz
Merge branch 'winh-jest-require-assertions' into 'master'
Make sure that each Jest test contains an assertion See merge request gitlab-org/gitlab-ce!31967
-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();
+});