Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@bes/snap", | ||
"version": "1.0.0", | ||
"description": "Simple testing snapshot utility used in boilreact", | ||
"main": "index.js", | ||
"version": "1.0.1", | ||
"description": "Simple snapshot utility used in boilreact", | ||
"main": "src/index.js", | ||
"scripts": { | ||
@@ -7,0 +7,0 @@ "test": "node tests/runner.js" |
@@ -5,6 +5,10 @@ # Snap | ||
``` | ||
$ npm i @bes/snap --save-dev | ||
``` | ||
## Usage | ||
```js | ||
const snap = require('snap')({ | ||
const snap = require('@bes/snap')({ | ||
outputDir: './tests/_snapshots/html', | ||
@@ -26,1 +30,29 @@ outputFile: './tests/_snapshots/snap.json' | ||
``` | ||
## Idea | ||
It works similarly to jest snapshot but with less magic. The idea is to create | ||
a file e.g. `snap.json` where the snapshot info will be saved. | ||
```json | ||
{ | ||
"000": { | ||
"numId": "000", | ||
"mess": "Hello, World!" | ||
}, | ||
"001": { | ||
"numId": "001", | ||
"mess": "Boom" | ||
} | ||
} | ||
``` | ||
This while in a new directory saving the data themselves. | ||
``` | ||
_snapshots | ||
├── html | ||
│ ├── 000.html | ||
│ └── 001.html | ||
└── snap.json | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55588
57