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 want to avoid wrapping my test components with DataProviderContext, and I tried adding it to TestContext instead.
I can't add the DataProviderContext to TestContext. When running tests where I pass a custom tataProvider, the test uses the default dataProvider instead.
ra-test uses the DataProviderContext from ra-core compiled. So when a ra-core test calls the TestContext from ra-test, it actually uses a different DataProviderContext than ra-core.
Solution
Move back TestContext to ra-core. It was moved out in #5846 to avoid bundling react-tesing-library in production, but this concerns the renderXXX functions, not the TestContext itself.
This is a BC break, as we can't have 2 packages of the same name in both ra-core and ra-test.
The text was updated successfully, but these errors were encountered:
Problem
I want to avoid wrapping my test components with DataProviderContext, and I tried adding it to TestContext instead.
I can't add the DataProviderContext to TestContext. When running tests where I pass a custom tataProvider, the test uses the default dataProvider instead.
This is the code I'm testing:
Explanation
ra-test uses the DataProviderContext from ra-core compiled. So when a ra-core test calls the TestContext from ra-test, it actually uses a different DataProviderContext than ra-core.
Solution
Move back TestContext to ra-core. It was moved out in #5846 to avoid bundling react-tesing-library in production, but this concerns the renderXXX functions, not the TestContext itself.
This is a BC break, as we can't have 2 packages of the same name in both ra-core and ra-test.
The text was updated successfully, but these errors were encountered: