-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New platform] Add the service level mocks for server side #32300
Conversation
Pinging @elastic/kibana-platform |
|
||
import { ConfigService } from './config_service'; | ||
|
||
type MethodKeysOf<T> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a separate place for declaring our custom TS helpers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet. There are notions like "test utilities" elsewhere in the project that we could adopt in some form.
Do you anticipate using this helper in a lot of places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right now I inline it in every *.mock.ts
file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's not great. We should come up with something, but it doesn't need to be in this PR.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is only for the core/server though. We should have the same conventions established in core/public as well. Can you update the title of this PR before merging to reflect that this is server-only?
@epixa should we backport new platform features? I will send another PR for client side |
…2300) * add LoggingServiceMock * add configServiceMock * add httpServiceMock and elasticsearchServiceMock * use elasticsearch.startContract instead of inlined declarations * add createStartContract factory
@restrry Yes, to |
Summary
Issue #31486
http
,config
,logging
,elasticsearch
servicesChecklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
Screenshots
when a mock implementation isn't full
when a mock implementation doesn't satisfy a contract