fix globalSearchBar jest env (#95640)

This commit is contained in:
Pierre Gayvallet 2021-03-29 22:23:29 +02:00 committed by GitHub
parent ace1efcd98
commit 683d140229
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -9,7 +9,4 @@ module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/x-pack/plugins/global_search_bar'],
// TODO: migrate to "jest-environment-jsdom" https://github.com/elastic/kibana/issues/95200
testEnvironment: 'jest-environment-jsdom-thirteen',
};

View file

@ -120,7 +120,8 @@ describe('SearchBar', () => {
basePathUrl={basePathUrl}
darkMode={darkMode}
trackUiMetric={jest.fn()}
/>
/>,
{ attachTo: document.body }
);
const searchEvent = new KeyboardEvent('keydown', {