-
-
Notifications
You must be signed in to change notification settings - Fork 321
Open
Description
After downloading the repo, doing yarn, yarn install and choosing the stack as react-react native+node I run tests by yarn tests. I get the below error about mobile tests every time. When I remove the mobile test it gives the same error with others. I tried to find where the jest.mock used to update the code to watchall without success.
apollo-universal-starter-kit-master apple$ yarn tests
yarn run v1.22.4
$ lerna run --parallel tests --stream
lerna notice cli v3.15.0
lerna info versioning independent
lerna info Executing command in 3 packages: "yarn run tests"
mobile: $ jest
client: $ jest
server: $ cross-env PORT=7070 jest --forceExit
mobile: Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
mobile: FAIL ../../modules/core/client-react-native/__tests__/Intro.test.native.tsx
mobile: ● Test suite failed to run
mobile: babel-plugin-jest-hoist: The module factory of `jest.mock()` is not allowed to reference any out-of-scope variables.
mobile: Invalid variable access: process
mobile: Whitelisted objects: Array, ArrayBuffer, Boolean, DataView, Date, Error, EvalError, Float32Array, Float64Array, Function, Generator, GeneratorFunction, Infinity, Int16Array, Int32Array, Int8Array, InternalError, Intl, JSON, Map, Math, NaN, Number, Object, Promise, Proxy, RangeError, ReferenceError, Reflect, RegExp, Set, String, Symbol, SyntaxError, TypeError, URIError, Uint16Array, Uint32Array, Uint8Array, Uint8ClampedArray, WeakMap, WeakSet, arguments, console, expect, isNaN, jest, parseFloat, parseInt, require, undefined, global, clearInterval, clearTimeout, setInterval, setTimeout, queueMicrotask, clearImmediate, setImmediate.
mobile: Note: This is a precaution to guard against uninitialized mock variables. If it is ensured that the mock is required lazily, variable names prefixed with `mock` (case insensitive) are permitted.
mobile: at invariant (node_modules/babel-plugin-jest-hoist/build/index.js:15:11)
mobile: at newFn (node_modules/@babel/traverse/lib/visitors.js:193:21)
mobile: at NodePath._call (node_modules/@babel/traverse/lib/path/context.js:53:20)
mobile: at NodePath.call (node_modules/@babel/traverse/lib/path/context.js:40:17)
mobile: Test Suites: 1 failed, 1 total
mobile: Tests: 0 total
mobile: Snapshots: 0 total
mobile: Time: 2.823s
mobile: Ran all test suites.
mobile: error Command failed with exit code 1.
mobile: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run tests exited 1 in 'mobile'
lerna WARN complete Waiting for 2 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
Metadata
Metadata
Assignees
Labels
No labels