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'm using Dagger for injection and in some places in the unit tests I used injection too.
By adding the chucker into my OKHttp some of my unit tests start to fail because of the checker. I don't have different component for tests which is recommended as I understand, But I'm wondering the reason that chucker make an issue with tests in this case, and maybe a solution for it because changing into my current dagger flow is really hard and I'm trying to avoid it for now.
💣 Steps to reproduce
Provide OkHttp with Dagger
Add Chucker as an interceptor into the OkHttp
use the OkHttp into unit-test test components(Module that providing the OkHttp is same as production DI)
Test Components will not generate because they have an issue providing chucker (This is only in test components not in production components)
App builds successfully and chucker works, But tests fail
🔧 Expected behavior
Why Chucker has a problem with unit tests, and a solution to fix it.
📱 Tech info
OS: Android
Chucker version: 3.5.2
The text was updated successfully, but these errors were encountered:
It's not chucker's responsibility to know the context in which it's being executed (i.e. in your unit test); it's your app's responsibility to ensure that Chucker isn't installed/configured as part of your unit test suite
It's not chucker's responsibility to know the context in which it's being executed (i.e. in your unit test); it's your app's responsibility to ensure that Chucker isn't installed/configured as part of your unit test suite
Chucker works under the assumption that there is an Android Context where UI can be rendered. You're right that we could refactor this, but that's how the library works currently.
✍️ Describe the bug
I'm using Dagger for injection and in some places in the unit tests I used injection too.
By adding the chucker into my OKHttp some of my unit tests start to fail because of the checker. I don't have different component for tests which is recommended as I understand, But I'm wondering the reason that chucker make an issue with tests in this case, and maybe a solution for it because changing into my current dagger flow is really hard and I'm trying to avoid it for now.
💣 Steps to reproduce
🔧 Expected behavior
Why Chucker has a problem with unit tests, and a solution to fix it.
📱 Tech info
The text was updated successfully, but these errors were encountered: