Socket
Socket
Sign inDemoInstall

@storybook/addon-jest

Package Overview
Dependencies
Maintainers
11
Versions
1854
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/addon-jest - npm Package Compare versions

Comparing version 3.2.16 to 3.2.17

2

dist/components/Panel.js

@@ -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 @@

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