Skip to content

This action runs jest to test code. It also includes the firebase firestore emulator to make it possible to also test firestore rules.

License

Notifications You must be signed in to change notification settings

Paul-creator/firebase-firestore-testing-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jest testing (including firestore rules)

This action runs jest to test code. It also includes the firebase firestore emulator to make it possible to also test firestore rules.

Assumptions

This action assumes that:

  • Your file structure contains a folder in the root directory called functions which contains all your functions code.
  • You have the following npm script in your package.json:
...
  "scripts": {
    "test:ci": "firebase emulators:exec --only firestore jest",
  }
...

Example

Here is an example yaml file to run the action:

name: Jest

on: [pull_request]

jobs:
  test:
    name: test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v1

      - name: Run Jest
        uses: IIIMPACT/[email protected]

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

About

This action runs jest to test code. It also includes the firebase firestore emulator to make it possible to also test firestore rules.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 59.3%
  • Shell 40.7%