node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

@toptal/testshot

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: