You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You offer some tests, but I think there is just auth tests concerned. I am looking to use firestore with Vitest and it doesnt work, could you insert an example of a unit test using a firestore CRUD operation ?
stdout | src/lib/firebase/dao.test.ts > TESTING TIN--2... > TEST_1
[FirebaseError: Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore] {
code: 'invalid-argument',
customData: undefined,
toString: [Function (anonymous)]
}
The text was updated successfully, but these errors were encountered:
Hello @regnou . Great to see you're getting somewhere using SvelteKit and Firebase, and want to do tests with Vitest too! I'm excited for you.
It's worth noting this repo isn't a "starter"... of course, you're free to clone it, or fork it, or copy & paste from it and use it however you want to help you get started if you wish. If I didn't want that, I wouldn't have made it public or link to it from my videos!
But mostly I'm using it as a demo, and to highlight things I wanna show in my videos. If I make a video about using the Firestore, I'll make sure to have a section to talk about testing, and have done the relevant code here to showcase. But as you may know, it does take me a lot of time to make these videos, so I gotta pick the subjects carefully... and I think there are many things I'd want to cover before we get to using the Firestore!
(the video I'm editing currently is on SvelteKit Endpoints for example)
So, I am noting this as a video idea, but just setting expectations that I'm unlikely to act on it...
Also: Your issue seems to be around Firebase Unit Testing, it's not Svelte or SvelteKit or Vitest specific! You may have more luck investigating that, maybe that @firebase/rules-unit-testing library?
Alternatively, you could get around all of this if you did E2E testing with Playwright or Cypress instead...
I ve asked a question here: https://stackoverflow.com/questions/72539977/error-when-using-firestore-and-vitest-i-cannot-add-items-with-firestore-executi
You offer some tests, but I think there is just auth tests concerned. I am looking to use firestore with Vitest and it doesnt work, could you insert an example of a unit test using a firestore CRUD operation ?
Thansk you,
here is my test
and here is the error:
The text was updated successfully, but these errors were encountered: