Mocks for CoreStart, CoreSetup and PluginInitializerContext (#39351)

* Mocks for CoreStart, CoreSetup and PluginInitializerContext

* Public CoreStart, CoreSetup mocks

* Update api signature/docs

* Convert embaddable_api tests to new core mocks

* CR Feedback

* Introduce ui_new_platform.test.mocks and refactor embedabble tests

* Hack to get TS warnings for Core mocks

* Core mocks types cleanup & hack to get TS warnings for Server Core mocks

* Use __mocks__ new_platform

* Remove accidently commited auto-mock

* Introduce MockedKeys type for Core mocks

* Better typing/docs for UiSettings

* Revert "Use __mocks__ new_platform"

This reverts commit 2d666facc8.

* Add missing mock to test

* Cleanup UiSettings types
This commit is contained in:
Rudolf Meijering 2019-06-28 13:34:41 +02:00 committed by GitHub
parent f70b32078c
commit da09a11858
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 259 additions and 158 deletions

2
typings/index.d.ts vendored
View file

@ -28,3 +28,5 @@ type MethodKeysOf<T> = {
}[keyof T];
type PublicMethodsOf<T> = Pick<T, MethodKeysOf<T>>;
type MockedKeys<T> = { [P in keyof T]: jest.Mocked<T[P]> };