https://github.com/remarkablemark/snapped
https://github.com/remarkablemark/snapped
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/remarkablemark/snapped
- Owner: remarkablemark
- License: mit
- Created: 2017-04-09T20:39:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-09T21:28:15.000Z (about 8 years ago)
- Last Synced: 2025-03-16T03:33:32.659Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/snapped
- Size: 35.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# snapped
[](https://nodei.co/npm/snapped/)
[](https://www.npmjs.com/package/snapped)
[](https://travis-ci.org/remarkablemark/snapped)
[](https://coveralls.io/github/remarkablemark/snapped?branch=master)Snapshot generator for [React](https://facebook.github.io/react/) UI. Inspired by [Jest snapshot testing](https://facebook.github.io/jest/docs/snapshot-testing.html).
## Install
```sh
$ npm install snapped
```## Usage
```jsx
import generateSnapshot from 'snapped';
const reactElement = (
Hello, world!
);
console.log(
generateSnapshot(reactElement)
);
```Output:
```
Hello, world!```
## Testing
```sh
$ npm test
$ npm run lint
```## License
[MIT](https://github.com/remarkablemark/snapped/blob/master/LICENSE)