Skip to content
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

Allow eager instantiation of the instrumentation library #491

Closed
evantorrie opened this issue Jan 13, 2017 · 1 comment
Closed

Allow eager instantiation of the instrumentation library #491

evantorrie opened this issue Jan 13, 2017 · 1 comment

Comments

@evantorrie
Copy link
Contributor

Please use the template provided below, when reporting bugs:

Expected Behavior

When mockery is used for test mocks, I don't want to see warnings about all of nyc/istanbul's modules that are required appearing prior to the first test.

Observed Behavior

Some mocking libraries hook require and by default warn when there is a required
module which has not been explicitly registered, e.g. mockery.
It is standard procedure to call mockery.enable() in a unit test prior to
requiring the code under test since obviously you want the hooks to be in place at the time that the

With lazy instantiation of the instrumenter, all of the instrumenter
library's requires generate mockery warnings at test time.

Bonus Points! Code (or Repository) that Reproduces Issue

See https://gist.github.com/evantorrie/d702ccd2e0ac2f30deb76e336128bddd

@bcoe
Copy link
Member

bcoe commented Jan 16, 2017

@evantorrie thanks for the thorough issue! hoping to have some time to dig into OSS this week, and will hopefully get to this. Would also happily accept a pull request.

@bcoe bcoe closed this as completed Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants