Commit 8c2116ff authored by Denys Mishunov's avatar Denys Mishunov

Stubbing PerformanceObserver in tests

parent a2cd41be
......@@ -58,6 +58,14 @@ class CustomEnvironment extends JSDOMEnvironment {
measure: () => null,
getEntriesByName: () => [],
});
this.global.PerformanceObserver = class {
/* eslint-disable no-useless-constructor, no-unused-vars, no-empty-function, class-methods-use-this */
constructor(callback) {}
disconnect() {}
observe(element, initObject) {}
/* eslint-enable no-useless-constructor, no-unused-vars, no-empty-function, class-methods-use-this */
};
}
async teardown() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment