-
Notifications
You must be signed in to change notification settings - Fork 918
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ReferenceError: self is not defined on Jest tests firebase@10.12.3 #8365
ReferenceError: self is not defined on Jest tests firebase@10.12.3 #8365
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
May be related to #8315. The change seems to cause Edit: Jest runs in Node so |
Actually I looked further into this and it looks like Jest is supposed to have I'm not actually sure what kind of environment you have where |
Hi, I'm using the @Stencil preset "jest": { with jest 29.
Now get this:
Sorry, I got ahead of myself. I rolled stencil forward and back again and I could not "reproduce" the fix. I double checked and the version of Firebase was actually rolled back which caused it to function with both versions of Stencil. |
Looks like stencil does not use either Jest's provided The custom environment is built off of Jest's In your case, maybe a quick hacky workaround would be to assign |
Operating System
iOS 16+
Browser Version
Chrome latest
Firebase SDK Version
10.12.3
Firebase SDK Product:
Analytics, Auth, Firestore, Functions, Remote-Config
Describe your project's tooling
Ionic Stencil app with Jest
Describe the problem
Running Jest tests I got this error anywhere I had imported firebase, I'm using the emulator on jest. Here is my command:
"test.ci": "firebase emulators:exec --only firestore 'stencil test --spec --ci --coverage --exit'",
Rolling back to firebase@10.12.2 fixed the issue.
Steps and code to reproduce issue
For our app I can update from Firebase 10.12.2 to 10.12.3 to trigger the error. Rolling back to 10.12.2 fixes it.
The text was updated successfully, but these errors were encountered: