summaryrefslogtreecommitdiff
path: root/spec/frontend/test_setup.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/test_setup.js')
-rw-r--r--spec/frontend/test_setup.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/frontend/test_setup.js b/spec/frontend/test_setup.js
index ab42dbe7cd1..203781bb6fc 100644
--- a/spec/frontend/test_setup.js
+++ b/spec/frontend/test_setup.js
@@ -57,6 +57,11 @@ Object.assign(global, {
// custom-jquery-matchers was written for an old Jest version, we need to make it compatible
Object.entries(jqueryMatchers).forEach(([matcherName, matcherFactory]) => {
+ // Don't override existing Jest matcher
+ if (matcherName === 'toHaveLength') {
+ return;
+ }
+
expect.extend({
[matcherName]: matcherFactory().compare,
});