diff --git a/packages/kbn-utility-types/test/index.ts b/packages/kbn-utility-types/jest/index.ts similarity index 100% rename from packages/kbn-utility-types/test/index.ts rename to packages/kbn-utility-types/jest/index.ts diff --git a/packages/kbn-utility-types/jest/package.json b/packages/kbn-utility-types/jest/package.json new file mode 100644 index 00000000000000..9f92fc5e945280 --- /dev/null +++ b/packages/kbn-utility-types/jest/package.json @@ -0,0 +1,3 @@ +{ + "types": "../target/jest/index.d.ts" +} diff --git a/packages/kbn-utility-types/test/package.json b/packages/kbn-utility-types/test/package.json deleted file mode 100644 index f382cb28819591..00000000000000 --- a/packages/kbn-utility-types/test/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "types": "../target/test/index.d.ts" -} - \ No newline at end of file diff --git a/packages/kbn-utility-types/tsconfig.json b/packages/kbn-utility-types/tsconfig.json index 53c07355277c0d..c2d206526e6f43 100644 --- a/packages/kbn-utility-types/tsconfig.json +++ b/packages/kbn-utility-types/tsconfig.json @@ -11,7 +11,7 @@ "jest" ] }, - "include": ["index.ts", "test/**/*", "test-d/**/*"], + "include": ["index.ts", "jest/**/*", "test-d/**/*"], "exclude": [ "target" ] diff --git a/src/core/public/apm_system.test.ts b/src/core/public/apm_system.test.ts index 77489c7f357c96..be1cb6dc682080 100644 --- a/src/core/public/apm_system.test.ts +++ b/src/core/public/apm_system.test.ts @@ -18,9 +18,8 @@ */ jest.mock('@elastic/apm-rum'); -import type { DeeplyMockedKeys } from '@kbn/utility-types/test'; +import type { DeeplyMockedKeys } from '@kbn/utility-types/jest'; import { init, apm } from '@elastic/apm-rum'; -import { DeeplyMockedKeys } from '../typings'; import { ApmSystem } from './apm_system'; const initMock = init as jest.Mocked; diff --git a/src/core/public/chrome/chrome_service.mock.ts b/src/core/public/chrome/chrome_service.mock.ts index 5d527184dfd121..cbcd23615d34ca 100644 --- a/src/core/public/chrome/chrome_service.mock.ts +++ b/src/core/public/chrome/chrome_service.mock.ts @@ -18,7 +18,7 @@ */ import { BehaviorSubject } from 'rxjs'; import type { PublicMethodsOf } from '@kbn/utility-types'; -import type { DeeplyMockedKeys } from '@kbn/utility-types/test'; +import type { DeeplyMockedKeys } from '@kbn/utility-types/jest'; import { ChromeBadge, ChromeBrand, ChromeBreadcrumb, ChromeService, InternalChromeStart } from './'; const createStartContractMock = () => { diff --git a/src/core/public/notifications/notifications_service.mock.ts b/src/core/public/notifications/notifications_service.mock.ts index 70b8cd59b6eb07..b69b4604d0788e 100644 --- a/src/core/public/notifications/notifications_service.mock.ts +++ b/src/core/public/notifications/notifications_service.mock.ts @@ -17,7 +17,7 @@ * under the License. */ import type { PublicMethodsOf } from '@kbn/utility-types'; -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { NotificationsService, NotificationsSetup, diff --git a/src/core/public/overlays/overlay_service.mock.ts b/src/core/public/overlays/overlay_service.mock.ts index a698498ac3a27a..595813972b8bc4 100644 --- a/src/core/public/overlays/overlay_service.mock.ts +++ b/src/core/public/overlays/overlay_service.mock.ts @@ -17,7 +17,7 @@ * under the License. */ import type { PublicMethodsOf } from '@kbn/utility-types'; -import type { DeeplyMockedKeys } from '@kbn/utility-types/test'; +import type { DeeplyMockedKeys } from '@kbn/utility-types/jest'; import { OverlayService, OverlayStart } from './overlay_service'; import { overlayBannersServiceMock } from './banners/banners_service.mock'; import { overlayFlyoutServiceMock } from './flyout/flyout_service.mock'; diff --git a/src/core/server/core_context.mock.ts b/src/core/server/core_context.mock.ts index 991306e2592d7d..4df0b2dfb9d8a7 100644 --- a/src/core/server/core_context.mock.ts +++ b/src/core/server/core_context.mock.ts @@ -18,7 +18,7 @@ */ import { REPO_ROOT } from '@kbn/dev-utils'; -import type { DeeplyMockedKeys } from '@kbn/utility-types/test'; +import type { DeeplyMockedKeys } from '@kbn/utility-types/jest'; import { CoreContext } from './core_context'; import { Env, IConfigService } from './config'; import { configServiceMock, getEnvOptions } from './config/mocks'; diff --git a/src/core/server/elasticsearch/client/mocks.ts b/src/core/server/elasticsearch/client/mocks.ts index da6248f9e9d5c3..bedd0e65c5a832 100644 --- a/src/core/server/elasticsearch/client/mocks.ts +++ b/src/core/server/elasticsearch/client/mocks.ts @@ -18,7 +18,7 @@ */ import { Client, ApiResponse } from '@elastic/elasticsearch'; import { TransportRequestPromise } from '@elastic/elasticsearch/lib/Transport'; -import type { DeeplyMockedKeys } from '@kbn/utility-types/test'; +import type { DeeplyMockedKeys } from '@kbn/utility-types/jest'; import { ElasticsearchClient } from './types'; import { ICustomClusterClient } from './cluster_client'; diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index 7aa0074a3952e1..7551f53ab27de1 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -19,7 +19,7 @@ import { of } from 'rxjs'; import { duration } from 'moment'; import { ByteSizeValue } from '@kbn/config-schema'; -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { PluginInitializerContext, CoreSetup, CoreStart, StartServicesAccessor } from '.'; import { loggingSystemMock } from './logging/logging_system.mock'; import { loggingServiceMock } from './logging/logging_service.mock'; diff --git a/src/plugins/data/common/search/search_source/legacy/default_search_strategy.test.ts b/src/plugins/data/common/search/search_source/legacy/default_search_strategy.test.ts index 1bfa7b774a5970..b13f6ad2665461 100644 --- a/src/plugins/data/common/search/search_source/legacy/default_search_strategy.test.ts +++ b/src/plugins/data/common/search/search_source/legacy/default_search_strategy.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { defaultSearchStrategy } from './default_search_strategy'; import { LegacyFetchHandlers, SearchStrategySearchParams } from './types'; import { BehaviorSubject } from 'rxjs'; diff --git a/src/plugins/data/common/search/search_source/mocks.ts b/src/plugins/data/common/search/search_source/mocks.ts index d76ac18e243f33..ea7d6b4441ccfe 100644 --- a/src/plugins/data/common/search/search_source/mocks.ts +++ b/src/plugins/data/common/search/search_source/mocks.ts @@ -18,7 +18,7 @@ */ import { BehaviorSubject } from 'rxjs'; -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { uiSettingsServiceMock } from '../../../../../core/public/mocks'; import { SearchSource } from './search_source'; diff --git a/src/plugins/data/public/search/collectors/create_usage_collector.test.ts b/src/plugins/data/public/search/collectors/create_usage_collector.test.ts index 5d47a8e554ecce..b87ac11e810c9f 100644 --- a/src/plugins/data/public/search/collectors/create_usage_collector.test.ts +++ b/src/plugins/data/public/search/collectors/create_usage_collector.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { CoreSetup, CoreStart } from '../../../../../core/public'; import { coreMock } from '../../../../../core/public/mocks'; import { usageCollectionPluginMock, Setup } from '../../../../usage_collection/public/mocks'; diff --git a/src/plugins/data/public/search/es_search/get_es_preference.test.ts b/src/plugins/data/public/search/es_search/get_es_preference.test.ts index 88297844073b2f..8b3d335b38d17d 100644 --- a/src/plugins/data/public/search/es_search/get_es_preference.test.ts +++ b/src/plugins/data/public/search/es_search/get_es_preference.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { getEsPreference } from './get_es_preference'; import { CoreStart } from '../../../../../core/public'; import { coreMock } from '../../../../../core/public/mocks'; diff --git a/src/plugins/data/public/search/search_interceptor.test.ts b/src/plugins/data/public/search/search_interceptor.test.ts index 5b40bf4829d178..472caa5e4f45ff 100644 --- a/src/plugins/data/public/search/search_interceptor.test.ts +++ b/src/plugins/data/public/search/search_interceptor.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { CoreSetup, CoreStart } from '../../../../core/public'; import { coreMock } from '../../../../core/public/mocks'; import { IEsSearchRequest } from '../../common/search'; diff --git a/src/plugins/data/public/search/search_service.test.ts b/src/plugins/data/public/search/search_service.test.ts index 54701710bc7950..20041a02067d9f 100644 --- a/src/plugins/data/public/search/search_service.test.ts +++ b/src/plugins/data/public/search/search_service.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { coreMock } from '../../../../core/public/mocks'; import { CoreSetup, CoreStart } from '../../../../core/public'; diff --git a/src/plugins/data/server/search/routes/call_msearch.test.ts b/src/plugins/data/server/search/routes/call_msearch.test.ts index 15783173220ac4..183c2334b4e32a 100644 --- a/src/plugins/data/server/search/routes/call_msearch.test.ts +++ b/src/plugins/data/server/search/routes/call_msearch.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { DeeplyMockedKeys } from '@kbn/utility-types/test'; +import type { DeeplyMockedKeys } from '@kbn/utility-types/jest'; import { Observable } from 'rxjs'; import { IUiSettingsClient, IScopedClusterClient, SharedGlobalConfig } from 'src/core/server'; diff --git a/src/plugins/data/server/search/routes/msearch.test.ts b/src/plugins/data/server/search/routes/msearch.test.ts index 33ad6aad93c317..e2e5818cf9a721 100644 --- a/src/plugins/data/server/search/routes/msearch.test.ts +++ b/src/plugins/data/server/search/routes/msearch.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { Observable } from 'rxjs'; import { diff --git a/src/plugins/data/server/search/routes/search.test.ts b/src/plugins/data/server/search/routes/search.test.ts index 3840c4cf5660c2..845ab3bbe4eb16 100644 --- a/src/plugins/data/server/search/routes/search.test.ts +++ b/src/plugins/data/server/search/routes/search.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { Observable, from } from 'rxjs'; import { diff --git a/src/plugins/data/server/search/search_service.test.ts b/src/plugins/data/server/search/search_service.test.ts index dd8fe997fbd112..2b513be147e9d2 100644 --- a/src/plugins/data/server/search/search_service.test.ts +++ b/src/plugins/data/server/search/search_service.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { CoreSetup, CoreStart } from '../../../../core/server'; import { coreMock } from '../../../../core/server/mocks'; diff --git a/src/plugins/data/server/search/search_source/mocks.ts b/src/plugins/data/server/search/search_source/mocks.ts index 6d3f02527078d7..73b39b416316ee 100644 --- a/src/plugins/data/server/search/search_source/mocks.ts +++ b/src/plugins/data/server/search/search_source/mocks.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { KibanaRequest } from 'src/core/server'; import { searchSourceCommonMock } from '../../../common/search/search_source/mocks'; diff --git a/src/plugins/home/server/services/tutorials/tutorials_registry.test.ts b/src/plugins/home/server/services/tutorials/tutorials_registry.test.ts index 9615df23560e03..96dab89bb17025 100644 --- a/src/plugins/home/server/services/tutorials/tutorials_registry.test.ts +++ b/src/plugins/home/server/services/tutorials/tutorials_registry.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { TutorialsRegistry } from './tutorials_registry'; import { coreMock } from '../../../../../core/server/mocks'; import { CoreSetup } from '../../../../../core/server'; diff --git a/src/plugins/index_pattern_management/server/routes/preview_scripted_field.test.ts b/src/plugins/index_pattern_management/server/routes/preview_scripted_field.test.ts index b806ef50c8534c..9d4c1bf005e63e 100644 --- a/src/plugins/index_pattern_management/server/routes/preview_scripted_field.test.ts +++ b/src/plugins/index_pattern_management/server/routes/preview_scripted_field.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { CoreSetup, RequestHandlerContext } from 'src/core/server'; import { coreMock, httpServerMock } from '../../../../../src/core/server/mocks'; import { registerPreviewScriptedFieldRoute } from './preview_scripted_field'; diff --git a/src/plugins/kibana_utils/public/storage/storage.test.ts b/src/plugins/kibana_utils/public/storage/storage.test.ts index e4b1f4a3332e99..293194cae55a63 100644 --- a/src/plugins/kibana_utils/public/storage/storage.test.ts +++ b/src/plugins/kibana_utils/public/storage/storage.test.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { Storage } from './storage'; import { IStorage, IStorageWrapper } from './types'; diff --git a/src/plugins/security_oss/public/plugin.mock.ts b/src/plugins/security_oss/public/plugin.mock.ts index 867724567e5294..bb6e1c6bc65456 100644 --- a/src/plugins/security_oss/public/plugin.mock.ts +++ b/src/plugins/security_oss/public/plugin.mock.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import type { DeeplyMockedKeys } from '@kbn/utility-types/test'; +import type { DeeplyMockedKeys } from '@kbn/utility-types/jest'; import { mockInsecureClusterService } from './insecure_cluster_service/insecure_cluster_service.mock'; import { SecurityOssPluginSetup, SecurityOssPluginStart } from './plugin'; diff --git a/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts b/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts index 9b19325d10573e..f47d2b39a89a98 100644 --- a/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts +++ b/x-pack/plugins/data_enhanced/public/search/search_interceptor.test.ts @@ -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 type { MockedKeys } from '@kbn/utility-types/test'; +import type { MockedKeys } from '@kbn/utility-types/jest'; import { coreMock } from '../../../../../src/core/public/mocks'; import { EnhancedSearchInterceptor } from './search_interceptor'; import { CoreSetup, CoreStart } from 'kibana/public'; diff --git a/x-pack/plugins/task_manager/server/routes/_mock_handler_arguments.ts b/x-pack/plugins/task_manager/server/routes/_mock_handler_arguments.ts index c9f4de25afaf7b..2affbc7dbf7ee4 100644 --- a/x-pack/plugins/task_manager/server/routes/_mock_handler_arguments.ts +++ b/x-pack/plugins/task_manager/server/routes/_mock_handler_arguments.ts @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ +import type { MethodKeysOf } from '@kbn/utility-types'; import { RequestHandlerContext, KibanaRequest, KibanaResponseFactory } from 'kibana/server'; import { identity } from 'lodash'; import { httpServerMock } from '../../../../../src/core/server/mocks';