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

How to mock firebase.firestore namespace? #76

Open
Acterion opened this issue Nov 4, 2021 · 1 comment
Open

How to mock firebase.firestore namespace? #76

Acterion opened this issue Nov 4, 2021 · 1 comment

Comments

@Acterion
Copy link

Acterion commented Nov 4, 2021

Problem:
I am using firebase.firestore.Timestamp.now() in my entities constructors in the main app.
I need to be able to use them inside tests as well.
Just importing ts file with entities gives me an error: TypeError: Cannot read property 'Timestamp' of undefined.

I searched everywhere but can't find a solution to this problem. Can someone help? (Ideally with a code example)

@dmurvihill
Copy link
Owner

Can you post your non-working code? We will be unable to get anywhere without seeing what you are seeing.

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

2 participants