firebase / firebase-functions-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running tests imports main from package and fails to exec

RohovDmytro opened this issue · comments

Running test via jest executes main file from package.json. It's a react-native code in my setup and this messes things around.

image

Workaround is to mock @app/index via jest.setup.js

const { jest } = require('@jest/globals');

jest.mock('@app/index.js', () => ({}));

Note to mock before requiring firebase-functions-test