Skip to content

Conversation

@dackers86
Copy link
Member

@dackers86 dackers86 commented Jun 9, 2022

fixes: #689

@dackers86 dackers86 changed the title chore(*): updated ci node matrix to node 14 and 16 feat(*): upgrade to the latest emulator updates Jun 9, 2022
@dackers86 dackers86 requested review from huangjeff5 and joehan June 9, 2022 10:18
@huangjeff5
Copy link
Collaborator

LGTM, please wait for Joe's review too.

@dackers86 dackers86 marked this pull request as ready for review June 11, 2022 21:30
@dackers86 dackers86 requested a review from a team as a code owner June 11, 2022 21:30
Copy link
Collaborator

@joehan joehan left a 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\"",
Copy link
Collaborator

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?

Copy link
Member Author

@dackers86 dackers86 Jun 13, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm test does not work out of the box

3 participants