Role | Name | Email | Slack ---- | ---- | ----- | ----- *Product Owner* | Ryan Borker | [borker@gigster.com](mailto:boker@gigster.com) | [@borker] *Maintainer* | Mark Miyashita | [mark.miyashita@gigster.com](mailto:mark.miyashita@gigster.com) | [@mark]

Downloads in past


2.0.05 years ago5 years agoMinified + gzip package size for @gigster/module-loopback-jest in KB


Role | Name | Email | Slack ---- | ---- | ----- | ----- Product Owner | Ryan Borker | borker@gigster.com | @borker Maintainer | Mark Miyashita | mark.miyashita@gigster.com | @mark


Adds the jest testing framework to a Loopback API. This module generates the base infrastructure to use jest with a Loopback API and optionally generates tests for the default API.



Name | Status | Description ---- | ------ | ----------- generateTests | true/false | Set to true if you would like generated tests to be created for you for the API.


This module is dependent on jest version 21.2.1.


There are two examples for this package:
  1. with-tests - This example is generated with generateTests: true so it has the infrastructure as well as generated tests.
  2. without-tests - This example is generated with generateTests: false so it only has the base infrastructure and does not contain tests.



Module tests are defined using a test/scenarios.yaml file. This file defines the set of example gigs that we generate as part of integration testing. To run all tests, run yarn test at the root of this module.
Each scenario is generated in test/scenario/<name> which you can then cd into and run the actual app. For a scenario called default, this is done via:
cd test/scenario/default
yarn install

# Run tests.
yarn test

# Start the app.
yarn start