9537a823eb
* eui to 26.1.0 * Breadcrumb -> EuiBreadcrumb * keyCode -> key * src snapshot updates * update header variables file location * keyCode -> key in tests * x-pack simple snapshot updates * euitooltip updates * euioverlaymask updates * testbed keycode -> key * fixed header sass mixin * euidatagrid test workaround * euioverlapmask mock * euipaginationbutton markup * nav snapshot update * eui to 26.3.0 * flyout z-index fix * euiflyout snapshot updates * style snapshot updates * table actions have machine readable text * table actions have machine readable text * core api docs update * table actions snapshot update * eui to 26.3.1 * update table actions type * mock issue links; timeout done * breadcrumb -> euibreadcrumb Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
27 lines
1.1 KiB
JavaScript
27 lines
1.1 KiB
JavaScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
// bluebird < v3.3.5 does not work with MutationObserver polyfill
|
|
// when MutationObserver exists, bluebird avoids using node's builtin async schedulers
|
|
// x-pack has a different version of bluebird so it needs its own polyfills.js to ensure
|
|
// the scheduler is set on the right bluebird instance
|
|
const bluebird = require('bluebird');
|
|
bluebird.Promise.setScheduler(function (fn) {
|
|
global.setImmediate.call(global, fn);
|
|
});
|
|
|
|
const MutationObserver = require('mutation-observer');
|
|
Object.defineProperty(window, 'MutationObserver', { value: MutationObserver });
|
|
|
|
require('whatwg-fetch');
|
|
|
|
if (!global.URL.hasOwnProperty('createObjectURL')) {
|
|
Object.defineProperty(global.URL, 'createObjectURL', { value: () => '' });
|
|
}
|
|
|
|
// Will be replaced with a better solution in EUI
|
|
// https://github.com/elastic/eui/issues/3713
|
|
global._isJest = true;
|