Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[APM] Prevent console.error causing unit tests to fail locally (elast…
…ic#161959) elastic#161636 fixed a couple of unit tests that were failing locally but passing on CI. This PR should prevent this from happening again. **Why they failed locally and not on CI??** Locally `console.error` is treated as a test failure: https://github.com/elastic/kibana/blob/7ea0dd6b116a93024d68ea2d93fa4ce90e9bf189/x-pack/plugins/apm/jest_setup.js#L12-L15 Whereas on CI `console.*` is disabled: https://github.com/elastic/kibana/blob/a78c7b02b3b825826f39289e91e545ee6f4a67d9/packages/kbn-test/src/jest/setup/disable_console_logs.js#L9-L12 This means that if a test logs `console.error` it would fail locally but not on CI. This PR changes that so console.error will not cause unit tests to fail anywhere.
- Loading branch information