Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running tests imports main from package and fails to exec #219

Open
RohovDmytro opened this issue Jan 13, 2024 · 2 comments
Open

Running tests imports main from package and fails to exec #219

RohovDmytro opened this issue Jan 13, 2024 · 2 comments

Comments

@RohovDmytro
Copy link

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
@RohovDmytro
Copy link
Author

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

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

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

@RohovDmytro
Copy link
Author

Note to mock before requiring firebase-functions-test

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

No branches or pull requests

1 participant