You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also tried other approaches to pass the "mockLogger" without being part of the aws-embedded-metrics to avoid any TypeScript complaint. Unfortunately, the fact that Jest hoists the jest.mock definition doesn't help.
Context
I'm using this library to send metrics via the
metricScope
and I need to test the functionality. To do so I'm following the example described here https://github.com/awslabs/aws-embedded-metrics-node/blob/master/examples/testing/tests/module.jest.test.js.The project is written in TypeScript and I use jest for unit testing.
Issue
This example https://github.com/awslabs/aws-embedded-metrics-node/blob/master/examples/testing/tests/module.jest.test.js fails in a TypeScript context with the following error:
Question
mockLogger
to the test function without making TypeScript complain?The text was updated successfully, but these errors were encountered: