Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.42 KB

DEVELOPMENT.md

File metadata and controls

41 lines (31 loc) · 1.42 KB

Development

Requirements:

Running tests

To run the tests locally you'll need to:

  • Create a Firebase project for testing

    • Use firebase use --add to add it to this project
  • Download Service Account file (and database URL)

    • Download the service account key file somewhere outside of this Git repository (so that there is no chance to accidentally commit it)
  • Set the environment variables:

    • Use the absolute path of the service account file, with the database URL you found above:
    • export FIREBASE_SERVICE_ACCOUNT_JSON='<json_content_from_your_service_account_file_in_single_line>'
      export FIREBASE_CONFIG='{"databaseURL": "https://<project-id>.firebaseio.com","projectId": "<project-id>"}'
      export FIREBASE_HTTP_BASE_URL="https://us-central1-<project-id>.cloudfunctions.net"
  • You need to:

    • activate the firestore database (Firebase Console)
    • create a pubsub topic with gcloud beta pubsub topics create testTopic
  • Deploy the test suite:

    • sh tool/deploy.sh
  • Run the tests:

    • pub run test