ember-cli-gravatar icon indicating copy to clipboard operation
ember-cli-gravatar copied to clipboard

Prevent network requests during test run

Open christophermlne opened this issue 10 years ago • 1 comments

I just noticed that whenever I run my test suite that network requests are going out for Gravatar images.

Specifically, I have a component integration test that renders a template with the 'htmlbars-inline-precompile' method.

A child component that gets rendered as a result of this call to this.render() contains the Gravatar component.

Is there any way to disable network requests during a test run?

christophermlne avatar Oct 18 '15 20:10 christophermlne

This is definitely something we could support. I'm thinking it might be best to add as a configuration option that, when set to true, stubs out the image when in the test environment. Does this type of functionality sound like it'd work for you? I'll take a stab at getting something together this evening and let you know.

Thanks for taking the time to create this issue!

johno avatar Oct 19 '15 15:10 johno