YuY
Denoβ€’9mo ago
Yu

How to stub and spy an deep nested object in deno? (Firestore)

Im desperate with deno testing

how can I stub a firestore object in deno?

import { assertEquals } from "https://deno.land/std/assert/mod.ts";
import { assertSpyCalls, spy } from "jsr:@std/testing/mock";
import { Stub, stub } from "jsr:@std/testing/mock";
import ApplicationService from "./fake-api-service.ts";
import { Firestore } from "firebase-admin/firestore";

const firestoreMock = {
  collection: () => ({
    doc: () => ({
      set: async (data: any) => {}
    })
  })
};
Was this page helpful?