Open Nushio opened 2 months ago
This is the error I'm getting:
TypeError: Cannot read properties of undefined (reading 'userRecordConstructor')
at Object.makeUserRecord (node_modules/firebase-functions-test/lib/providers/auth.js:30:38)
at mockCustomer (test/helpers/customers.ts:10:47)
at Context.<anonymous> (test/purchases/handlers/savePurchase.spec.ts:11:38)
at processImmediate (node:internal/timers:478:21)
at process.callbackTrampoline (node:internal/async_hooks:130:17)
When i try to create a user:
const userRecord: UserRecord = testEnv.auth.makeUserRecord({
email: customer.email,
displayName: customer.displayName,
uid: userUid,
});
Oh no, we are migrating Firebase Functions to 6.0 and our cloud functions to V2 and this is breaking our tests
I created this PR that maybe should fix it: https://github.com/firebase/firebase-functions-test/pull/243
I don't exactly know what I'm doing, but I had to make similar changes in my own repo, so maybe it's this simple.
It's been a couple of months with no response here. There's even a PR listed. Is there anyone working on this project or should we consider it abandoned?
@EnduringBeta would you be willing to publish your fork under a namespace so that people can use that in the meantime?
Version info
firebase-functions-test: 3.3.0
firebase-functions: 6.X
firebase-admin: 12.5.0
Test case
Upgrade Firebase Functions to 6.0 (Contains breaking change)
Tests won't pass anymore
Because the latest version changed the default entrypoint, imports of this library need to be rewritten to point to their v1 versions.