debian-mirror-gitlab/spec/frontend/__helpers__/performance.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
396 B
JavaScript
Raw Normal View History

2022-08-13 15:12:31 +05:30
// 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 = () => {};
};