Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

199
Vistas
Error when testing against Firebase Emulator 'Expected type 'Pa', but it was: a custom Fa object'

I'm currently attempting to execute the following test in Cypress.

before(async () => {
  testEnv = await initializeTestEnvironment({
    projectId: MY_PROJECT_ID,
    firestore: {
      host: "localhost",
      port: 8080,
    },
  });
});
describe("Authorized user can write to collection", () => {
  it("Can write to firestore doc", async () => {
    console.log("testEnv", testEnv);

    const alice = testEnv.authenticatedContext("alice", { role: "user" });
    console.log("alice", alice);

    const firestore = alice.firestore();
    console.log("firestore", firestore);

    const testA = await assertSucceeds(
      setDoc(alice.firestore(), "/users/alice"),
      {
        foo: "bar",
      }
    );
    console.log("testA", testA);
  });
});

The test fails before the final console.log during the setDoc call. The error is

Expected type 'Pa', but it was: a custom Fa object

I believe I traced this custom Fa object to the _delegate property on the firestore variable, but I am unclear of how to proceed from here.

  • I make sure that the emulators are all running before running npx cypress open
  • I tried setting the firestore property via the hub and get the same result
  • I have also tried passing a 'rules' property to firestore as a string

Any help would be greatly appreciated!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda