Skip to content

[3.14.0] Deprecation false positives while running tests #12917

@tiagojufr

Description

@tiagojufr

Issue Description

When I run my tests using MockedProvider I get 2 deprecation warnings:

[InMemoryCache]: `addTypename` is deprecated and will be removed in Apollo Client 4.0. Please remove the `addTypename` option when initializing `InMemoryCache`.
[cache.diff]: `canonizeResults` is deprecated and will be removed in Apollo Client 4.0. Please remove this option.

I'm not using addTypename nor canonizeResults in all my codebase.
These deprecation warnings don't show up when I run my app, only when running tests with vitest.

Link to Reproduction

https://codesandbox.io/p/devbox/focused-drake-l73wfw

Reproduction Steps

  1. Open reproduction codesandbox
  2. Run npm t
  3. Check console for stderr

@apollo/client version

3.14.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions