summaryrefslogtreecommitdiff
path: root/spec/frontend/__helpers__
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-13 21:10:15 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-13 21:10:15 +0000
commita269fb8e7cca24b826dd3f53485641ffce93bbee (patch)
tree81a7c4f56feba26bb6244c8a3a76123533f68aa8 /spec/frontend/__helpers__
parent7e064974b92de60a3ef4642905e8af98a364a7a0 (diff)
downloadgitlab-ce-a269fb8e7cca24b826dd3f53485641ffce93bbee.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/__helpers__')
-rw-r--r--spec/frontend/__helpers__/performance.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/frontend/__helpers__/performance.js b/spec/frontend/__helpers__/performance.js
new file mode 100644
index 00000000000..3bdf163c22b
--- /dev/null
+++ b/spec/frontend/__helpers__/performance.js
@@ -0,0 +1,8 @@
+// FIXME(vslobodin): Remove this stub once we have migrated to Jest 28.
+// NOTE: Do not try to optimize these stubs as Jest 27 overwrites
+// the "global.performance" object in every suite where fake timers are enabled.
+export const stubPerformanceWebAPI = () => {
+ global.performance.getEntriesByName = () => [];
+ global.performance.mark = () => {};
+ global.performance.measure = () => {};
+};