0.1.3 • Published 7 years ago

@toptal/testshot v0.1.3

Weekly downloads
-
License
-
Repository
github
Last release
7 years ago

Testshot

Presentational snapshot testing for React components.

npm version Gitter

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:5000 in a browser.

create-react-app example

cd create-react-app-example
yarn start-testshot

Installation

yarn add @toptal/testshot

Configuring Webpack

Basic Usage

For the complete usage guide take a look here.

import React from 'react'
import {context, scenario} from '@toptal/testshot'
import Text from '.'

context('Text', () => {
  scenario('Default', () => (
    <Text>Text</Text>
  ))

  scenario('Purple', () => (
    <Text color='purple'>Purple text</Text>
  ))
})

Contributors

See here

Special thanks to: