Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Using MockedProvider - addTypename works for one developer, but not another. Vice versa for removeTypename #2129

Closed
sbcreates opened this issue Jun 21, 2018 · 2 comments

Comments

@sbcreates
Copy link

Intended outcome:

Testing components with MockedProvider. Mock queries are written out added to MockedProvider along with a prop for handling the typename (since it isn't provided in the query).
I expect that by using only one of the two - addTypename={false} or removeTypename={true} - for all tests, the test should run correctly for all developers on their machines.

Actual outcome:

For myself, my test fails if I have the prop addTypename={false} in my MockedProvider, so I use removeTypename={true}. Another developer also writing tests finds that it fails if they use removeTypename={true} and instead need to use addTypename={false} to get the tests to run and pass.

Version
Both apps are running these versions:

  • apollo-client: ^2.0.3
  • react-apollo: ^2.0.1
@danilobuerger
Copy link
Contributor

Since 2.1.2 (see #1882 ) there is no removeTypename. Maybe upgrade your dependencies first and try again.

@rosskevin
Copy link
Contributor

Closing - cleanup.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants