Commit 5e016f5b authored by Denys Mishunov's avatar Denys Mishunov

Mocked window.performance in JSDom environment

parent 7526ca50
......@@ -52,6 +52,12 @@ class CustomEnvironment extends JSDOMEnvironment {
// Expose the jsdom (created in super class) to the global so that we can call reconfigure({ url: '' }) to properly set `window.location`
this.global.dom = this.dom;
Object.assign(this.global.performance, {
mark: () => null,
measure: () => null,
getEntriesByName: () => [],
});
}
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