tessereact
tessereact
npm i tessereact
tessereact

tessereact

Presentational snapshot testing for React (HTML, CSS, Screenshots)

by tessereact

0.3.2 (see all)TypeScript:Not Found
npm i tessereact
Readme

Tessereact

Presentational snapshot testing for React components.

Tessereact is Testshot fork which supports CSS snapshots and screenshot diffs based on resolutions you choose.

Screenshot

Check usage guide for more screenshots.

Demo & Examples

Basic example

To build the basic example locally, run:

yarn install
yarn dev
yarn dev-server

Then open localhost:5001 in a browser.

Webpack example

cd webpack-example
yarn install
yarn start-tessereact

Installation

yarn add -D https://github.com/tessereact/tessereact.git

See Webpack integration guide or create-react-app integration guide for the subsequent installation instructions.

Basic Usage

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})
})

CI Support

Tessereact provides built-in CI support. Start Tessereact with enviroment variable CI=true.

env CI=true yarn start-tessereact

Authors

Contributors

Tessereact contributors

Special thanks to Testshot contributors:

Downloads/wk

2

GitHub Stars

18

LAST COMMIT

4yrs ago

MAINTAINERS

2

CONTRIBUTORS

8

OPEN ISSUES

0

OPEN PRs

1
VersionTagPublished
0.3.2
latest
5yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate