Skip to content

Commit

Permalink
Fix Jest URL polyfill.
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin committed Jun 23, 2020
1 parent 20b1830 commit ac705c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions x-pack/dev-tools/jest/setup/polyfills.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ const MutationObserver = require('mutation-observer');
Object.defineProperty(window, 'MutationObserver', { value: MutationObserver });

require('whatwg-fetch');
const URL = { createObjectURL: () => '' };
Object.defineProperty(window, 'URL', { value: URL });

if (!global.URL.hasOwnProperty('createObjectURL')) {
Object.defineProperty(global.URL, 'createObjectURL', { value: () => '' });
}

0 comments on commit ac705c9

Please sign in to comment.