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

IIIMPACT/firebase-firestore-testing-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 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": "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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published