0.1.3 • Published 7 years ago
@toptal/testshot v0.1.3
Testshot
Presentational snapshot testing for React components.
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
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
Special thanks to:
- Team Portal Toptal Team
- Aleksandar Djuric
- Nadya Tsech
- Sasha Koss