Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bes/snap

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bes/snap - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

6

package.json
{
"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
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc