Presentational snapshot testing for React components.
Tessereact is Testshot fork which supports CSS snapshots and screenshot diffs based on resolutions you choose.
Check usage guide for more screenshots.
To build the basic example locally, run:
yarn install
yarn dev
yarn dev-server
Then open localhost:5000
in a browser.
cd webpack-example
yarn install
yarn start-tessereact
yarn add -D https://github.com/tessereact/tessereact.git
See Webpack integration guide or create-react-app integration guide for the subsequent installation instructions.
For the complete usage guide take a look here.
import React from 'react'
import {context, scenario} from 'tessereact'
import Text from '.'
context('Text', () => {
scenario('Default', () => (
<Text>Text</Text>
))
scenario('Purple', () => (
<Text color='purple'>Purple text</Text>
), {css: true, screenshot: true})
})
Tessereact provides built-in CI support. Start Tessereact with enviroment variable CI=true
.
env CI=true yarn start-tessereact
Special thanks to Testshot contributors: