jest-styled-components
Advanced tools
Comparing version 1.3.3 to 2.0.0
{ | ||
"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 }) |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
9538
8
182
56
7
2