Skip to content

How to mock firebase.firestore namespace? #76

Open
@Acterion

Description

@Acterion

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions