@storybook/addon-jest
Advanced tools
Comparing version 3.2.16 to 3.2.17
@@ -178,3 +178,3 @@ 'use strict'; | ||
null, | ||
'This story has tests configures, but no file not found' | ||
'This story has tests configured, but no file was found' | ||
); | ||
@@ -181,0 +181,0 @@ } |
{ | ||
"name": "@storybook/addon-jest", | ||
"version": "3.2.16", | ||
"version": "3.2.17", | ||
"description": "React storybook addon that show component jest report", | ||
@@ -27,7 +27,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@storybook/components": "^3.2.16", | ||
"@storybook/components": "^3.2.17", | ||
"glamor": "^2.20.40", | ||
"glamorous": "^4.11.0", | ||
"global": "^4.3.2", | ||
"prop-types": "^15.6.0", | ||
"glamor": "^2.20.40", | ||
"glamorous": "^4.11.0" | ||
"prop-types": "^15.6.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "devDependencies": { |
@@ -80,7 +80,7 @@ # Storybook addon Jest | ||
```js | ||
import jestTestResults from '../.jest-test-results.json'; | ||
import withTests from '@storybook/addon-jest'; | ||
import results from '../.jest-test-results.json'; | ||
import { withTests } from '@storybook/addon-jest'; | ||
storiesOf('MyComponent', module) | ||
.addDecorator(withTests(jestTestResults, { filesExt: '.test.js' })('MyComponent', 'MyOtherComponent')) | ||
.addDecorator(withTests({ results })('MyComponent', 'MyOtherComponent')) | ||
.add('This story shows test results from MyComponent.test.js and MyOtherComponent.test.js', () => ( | ||
@@ -94,7 +94,7 @@ <div>Jest results in storybook</div> | ||
```js | ||
import jestTestResults from '../.jest-test-results.json'; | ||
import withTests from '@storybook/addon-jest'; | ||
import results from '../.jest-test-results.json'; | ||
import { withTests } from '@storybook/addon-jest'; | ||
export default withTests(jestTestResults, { | ||
filesExt: '.test.js', | ||
export default withTests({ | ||
results, | ||
}); | ||
@@ -116,2 +116,7 @@ ``` | ||
### withTests(options) | ||
- **options.results**: [OBJECT] jest output results. *mandatory* | ||
- **filteExt**: [STRING] test file extention. *optionnal*. This allow you to write "MyComponent" and not "MyComponent.test.js". It will be used as regex to find your file results. Default value is `((\\.specs?)|(\\.tests?))?(\\.js)?$`. That mean it will match: MyComponent.js, MyComponent.test.js, MyComponent.tests.js, MyComponent.spec.js, MyComponent.specs.js... | ||
## TODO | ||
@@ -118,0 +123,0 @@ |
@@ -101,3 +101,3 @@ import React from 'react'; | ||
if (!result) { | ||
return <NoTests>This story has tests configures, but no file not found</NoTests>; | ||
return <NoTests>This story has tests configured, but no file was found</NoTests>; | ||
} | ||
@@ -104,0 +104,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
5233581
135
1