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

jest-styled-components

Package Overview
Dependencies
Maintainers
2
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-styled-components - npm Package Compare versions

Comparing version 1.3.3 to 2.0.0

native/index.js

4

package.json
{
"name": "jest-styled-components",
"version": "1.3.3",
"version": "2.0.0",
"description": "Jest utilities for Styled Components",
"main": "./src/index.js",
"files": [
"native",
"src"

@@ -45,2 +46,3 @@ ],

"jest-diff": "^19.0.0",
"jest-matcher-utils": "^19.0.0",
"jest-snapshot": "^19.0.2",

@@ -47,0 +49,0 @@ "strip-ansi": "^3.0.1",

@@ -6,6 +6,2 @@ [![Build Status](https://travis-ci.org/styled-components/jest-styled-components.svg?branch=master)](https://travis-ci.org/styled-components/jest-styled-components)

## Preview
<img alt="Preview" src="screenshot.png" width="500px" height="505px" />
## Installation

@@ -17,4 +13,10 @@

## Usage
## React
### Preview
<img alt="Preview" src="assets/toMatchStyledComponentsSnapshot.png" width="500px" height="500px" />
### Usage
```js

@@ -31,7 +33,4 @@ // package.json

import { matcher, serializer } from 'jest-styled-components'
import 'jest-styled-components'
expect.extend(matcher)
expect.addSnapshotSerializer(serializer)
// ...

@@ -41,1 +40,20 @@

```
## React Native
### Preview
<img alt="Preview" src="assets/toHaveStyleRule1.png" width="440px" height="140px" />
<img alt="Preview" src="assets/toHaveStyleRule2.png" width="440px" height="140px" />
### Usage
```js
// *.spec.js
import 'jest-styled-components/native'
// ...
expect(tree).toHaveStyleRule('property', value)
```

@@ -1,7 +0,5 @@

const matcher = require('./matcher')
const serializer = require('./serializer')
const toMatchStyledComponentsSnapshot = require('./matchers/toMatchStyledComponentsSnapshot')
const styleSheetSerializer = require('./serializers/styleSheetSerializer')
module.exports = {
matcher,
serializer,
}
expect.addSnapshotSerializer(styleSheetSerializer)
expect.extend({ toMatchStyledComponentsSnapshot })
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