diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-08-19 11:13:42 +0000 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-08-21 10:12:10 +0200 |
commit | c1f42701ae962902c24423f67028157faf7236ad (patch) | |
tree | a523b93dceaf85b7c6f668ff33c486fcd560c2b2 | |
parent | 006bc124366078d717ea8a331fdfd1e2ccd3476f (diff) | |
download | gitlab-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.js | 6 |
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(); +}); |