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

jest-snapshot-serializer-raw

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

jest-snapshot-serializer-raw - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

always.d.ts

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="1.2.0"></a>
# [1.2.0](https://github.com/ikatyang/jest-snapshot-serializer-raw/compare/v1.1.0...v1.2.0) (2021-04-25)
### Features
* add an `always` entrypoint for the usage without `wrap` function ([#65](https://github.com/ikatyang/jest-snapshot-serializer-raw/issues/65)) ([351f290](https://github.com/ikatyang/jest-snapshot-serializer-raw/commit/351f290))
<a name="1.1.0"></a>

@@ -7,0 +17,0 @@ # [1.1.0](https://github.com/ikatyang/jest-snapshot-serializer-raw/compare/v1.0.0...v1.1.0) (2018-07-10)

4

lib/index.d.ts

@@ -5,5 +5,5 @@ declare const RAW: unique symbol;

}
export declare function test(something: any): something is Wrapper;
export declare function print(wrapper: Wrapper): string;
export declare function wrap(value: string): Wrapper;
export declare function test(value: any): value is Wrapper;
export declare function print(value: Wrapper): string;
export default wrap;
"use strict";
exports.__esModule = true;
var always = require("./always");
var RAW = Symbol["for"]('jest-snapshot-serializer-raw');
function test(something) {
return something && typeof something[RAW] === 'string';
}
exports.test = test;
function print(wrapper) {
return wrapper[RAW];
}
exports.print = print;
function wrap(value) {

@@ -17,2 +10,10 @@ var _a;

exports.wrap = wrap;
function test(value) {
return value && always.test(value[RAW]);
}
exports.test = test;
function print(value) {
return always.print(value[RAW]);
}
exports.print = print;
exports["default"] = wrap;
{
"name": "jest-snapshot-serializer-raw",
"version": "1.1.0",
"version": "1.2.0",
"description": "jest snapshot serializer for reducing escapes in the snapshot file",

@@ -20,3 +20,3 @@ "keywords": [

"scripts": {
"prepublish": "yarn run build",
"prepublish": "npm run build",
"lint": "tslint -p ./tsconfig.json",

@@ -32,8 +32,8 @@ "test": "jest",

"jest": "21.2.1",
"prettier": "1.13.7",
"prettier": "1.18.2",
"prettier-config-ikatyang": "1.1.1",
"standard-version": "4.4.0",
"ts-jest": "21.2.4",
"tslint": "5.10.0",
"tslint-plugin-prettier": "1.3.0",
"tslint": "5.15.0",
"tslint-plugin-prettier": "2.0.1",
"typescript": "2.9.2"

@@ -46,4 +46,6 @@ },

"/lib/**/*",
"/always.d.ts",
"/always.js",
"/ThirdPartyNoticeText.txt"
]
}

@@ -25,2 +25,4 @@ # jest-snapshot-serializer-raw

### Apply to specified snapshots
```json

@@ -63,2 +65,30 @@ {

### Apply to all snapshots
```json
{
"snapshotSerializers": ["jest-snapshot-serializer-raw/always"]
}
```
```js
// test.js
const example = `paragraph "one"\n\n'paragraph' \\two\\`;
test('after', () => {
expect(example).toMatchSnapshot();
});
```
```js
// test.js.snap
exports[`after 1`] = `
paragraph "one"
'paragraph' \\two\\
`;
```
## Development

@@ -65,0 +95,0 @@

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