2.0.0 • Published 6 years ago

@gigster/module-react-jest v2.0.0

Weekly downloads
14
License
UNLICENSED
Repository
-
Last release
6 years ago

react-jest

RoleNameEmailSlack
Product OwnerFrances Haugenfrances@gigster.com@frances
MaintainerMark Miyashitamark.miyashita@gigster.com@mark

Overview

Adds the Jest testing framework to a React or React Native app. This includes:

  • Dependencies
  • A default jest.config.js that works for both React and React Native
  • Optional Basic tests to make sure the app is functional as well as included snapshot tests

Usage

Specification

NameStatusDescription
generateTeststrue/falseSet to true if you would like generated tests to be created for you for the app.

Dependencies

This module works with the create-react-app block located here.

Examples

There's one example for this package:

  1. with-tests - This example is generated with generateTests: true so it has the infrastructure as well as generated tests.

Troubleshooting

Testing

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 with-tests, this is done via:

cd test/scenario/with-tests
yarn install

# Run tests.
yarn test

# Start the app.
yarn start
2.0.0

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago