This repository has been archived by the owner. It is now read-only.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
__snapshots__
.babelrc
README.md
index.js
index.test.js
package.json
testSetup.js
yarn.lock

README.md

Example for glamorous with jest and enzyme

Steps to run

git clone https://github.com/paypal/glamorous.git
cd glamorous/examples/with-jest
npm install
npm run test

Jest tests

Snapshot

Relative to Jest documentation, you don't need to create snapshot manually.

Outputting CSS to snapshots

If you are using Jest and Glamorous, you should also consider using jest-glamor-react so that your CSS gets outputted to snapshots and not just a hashed class.

Create react app

Using Create react app, you won't be able to set setupTestFrameworkScriptFile configuration for Jest.

See how to use testSetup.js file in the CRA test environment.