Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

264
Views
Pruebas unitarias fuera de línea de Firebase: no se pudieron cargar las credenciales predeterminadas

Estoy tratando de escribir algunas pruebas unitarias usando el emulador de base de fuego. No importa lo que haga, siempre me da este error:

 Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.

Prueba

 describe('Cloud Functions', function() { let myFunctions: any, adminInitStub: sinon.SinonStub<[options?: admin.AppOptions, name?: string], admin.app.App>; const tester = funcTest(); before(async () => { admin.initializeApp(); adminInitStub = sinon.stub(admin, "initializeApp"); myFunctions = await import("../src/index") }); after(() => { adminInitStub.restore(); tester.cleanup(); }); describe("dbOrderServiceOnCreated", () => { it("should add snapshot successfully", async function() { const wrapped = tester.wrap(myFunctions.dbOrderServiceOnCreated) wrapped(serviceOrderSnap) this.timeout(0); // THIS IS THE PROBLEM const value = await admin.firestore().collection(constants.collectionOrdersService).get(); return chai.assert.equal(value.size, 1); }) }) })
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!