apollographql / apollographql/apollo-tooling

installing apollo-env package breaks jest inline snapshots

Open
#1,545 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

**Intended outcome:** installing apollo-env does not break jest snapshots

**Actual outcome:**
```
● Test suite failed to run

TypeError: Function.prototype.toString requires that 'this' be a Function
at toString ()

at toString (node_modules/apollo-env/node_modules/core-js/internals/redefine.js:38:95)
at _isNativeFunction (node_modules/prettier/index.js:2008:28)
at _wrapNativeSuper (node_modules/prettier/index.js:2015:28)
at node_modules/prettier/index.js:40648:5
at createCommonjsModule (node_modules/prettier/index.js:184:35)
at Object. (node_modules/prettier/index.js:40620:27)

Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 3.398s, estimated 9s
Ran all test suites matching /TopicCompletionPage/i.
```

**How to reproduce the issue:**
1. install jest and apollo-env
2. try to save an inline snapshot

**Versions**

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with Jest and apollo-env, then inspect the stack through node_modules/apollo-env/node_modules/core-js/internals/redefine.js and node_modules/prettier/index.js. Run the suite matching TopicCompletionPage and check the installed dependency versions. Done means the suite starts and inline snapshots can be saved without the TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.