Consolidates Jest configuration files and scripts (#82671)

Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to  previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project.

OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest`

Blocker to #72569

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
Tyler Smalley 2020-11-12 16:19:56 -08:00 committed by GitHub
parent 452d4c8a8f
commit aba2068291
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
605 changed files with 1110 additions and 2409 deletions

View file

@ -5,7 +5,7 @@
*/
import { act } from 'react-dom/test-utils';
import { registerTestBed } from '../../../../../test_utils';
import { registerTestBed } from '@kbn/test/jest';
import { RemoteClusterAdd } from '../../../public/application/sections/remote_cluster_add';
import { createRemoteClustersStore } from '../../../public/application/store';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerTestBed } from '../../../../../test_utils';
import { registerTestBed } from '@kbn/test/jest';
import { RemoteClusterEdit } from '../../../public/application/sections/remote_cluster_edit';
import { createRemoteClustersStore } from '../../../public/application/store';

View file

@ -4,5 +4,5 @@
* you may not use this file except in compliance with the Elastic License.
*/
export { nextTick, getRandomString, findTestSubject } from '../../../../../test_utils';
export { nextTick, getRandomString, findTestSubject } from '@kbn/test/jest';
export { setupEnvironment } from './setup_environment';

View file

@ -5,7 +5,7 @@
*/
import { act } from 'react-dom/test-utils';
import { registerTestBed, findTestSubject } from '../../../../../test_utils';
import { registerTestBed, findTestSubject } from '@kbn/test/jest';
import { RemoteClusterList } from '../../../public/application/sections/remote_cluster_list';
import { createRemoteClustersStore } from '../../../public/application/store';

View file

@ -3,7 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { getRandomString } from '../../../test_utils';
import { getRandomString } from '@kbn/test/jest';
import { SNIFF_MODE } from '../common/constants';

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { mountWithIntl, renderWithIntl } from 'test_utils/enzyme_helpers';
import { mountWithIntl, renderWithIntl } from '@kbn/test/jest';
import { findTestSubject, takeMountedSnapshot } from '@elastic/eui/lib/test';
import { RemoteClusterForm } from './remote_cluster_form';