-
Notifications
You must be signed in to change notification settings - Fork 424
feat(*): upgrade to the latest emulator updates #995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
LGTM, please wait for Joe's review too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one question
| "test": "jest", | ||
| "local:emulator": "cd ../../_emulator && firebase emulators:start -P demo-test", | ||
| "test": "cd ../../_emulator && firebase emulators:exec jest -P demo-test", | ||
| "test:local": "concurrently \"npm run local:emulator\" \"jest\"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any potential for a race condition here? ie can the tests start running before the emulator starts up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there could be. I'm currently refining and playing with examples, we could for example run an sh script, something like....?
#!/bin/bash
if ! [ -x "$(command -v firebase)" ]; then
echo "❌ Firebase tools CLI is missing."
exit 1
fi
until curl --output /dev/null --silent --fail http://localhost:9099; do
echo "Waiting for Firestore emulator to come online..."
sleep 2
done
echo "Firestore emulator is online!"
cd ../functions
jest --watch
fixes: #689