Socket
Socket
Sign inDemoInstall

@storybook/addon-jest

Package Overview
Dependencies
Maintainers
9
Versions
1851
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 4.0.0-alpha.23 to 4.0.0-alpha.24

8

package.json
{
"name": "@storybook/addon-jest",
"version": "4.0.0-alpha.23",
"version": "4.0.0-alpha.24",
"description": "React storybook addon that show component jest report",

@@ -34,4 +34,4 @@ "keywords": [

"@emotion/styled": "^0.10.6",
"@storybook/addons": "4.0.0-alpha.23",
"@storybook/components": "4.0.0-alpha.23",
"@storybook/addons": "4.0.0-alpha.24",
"@storybook/components": "4.0.0-alpha.24",
"global": "^4.3.2",

@@ -44,3 +44,3 @@ "prop-types": "^15.6.2",

},
"gitHead": "2ca9c34c4c929109170b01751632858934b1b54d"
"gitHead": "bdc8120ab9456b34e2f67692cc3439ac75c4ba54"
}

@@ -45,3 +45,3 @@ # Storybook addon Jest

You need to make sure the generated test-restuls file exists before you start storybook.
You need to make sure the generated test-results file exists before you start storybook.
During development you will likely start jest in watch-mode

@@ -56,3 +56,3 @@ and so the json file will be re-generated every time code or tests change.

If you want to pre-run jest automaticly during development or a static build,
If you want to pre-run jest automatically during development or a static build,
you may need to consider that if your tests fail, the script receives a non-0 exit code and will exit.

@@ -82,3 +82,3 @@ You could create a `prebuild:storybook` npm script, which will never fail by appending `|| true`:

Assuming that you have created a test files `MyComponent.test.js` and `MyOtherComponent.test.js`
Assuming that you have created test files `MyComponent.test.js` and `MyOtherComponent.test.js`

@@ -142,11 +142,11 @@ In your `story.js`

- **options.results**: OBJECT jest output results. _mandatory_
- **filesExt**: STRING test file extention. _optional_. 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...
- **filesExt**: STRING test file extension. _optional_. This allows 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 means it will match: MyComponent.js, MyComponent.test.js, MyComponent.tests.js, MyComponent.spec.js, MyComponent.specs.js...
## Usage with Angular
Assuming that you have created a test files `my.component.spec.ts` and `my-other.comonent.spec.ts`
Assuming that you have created test files `my.component.spec.ts` and `my-other.comonent.spec.ts`
Configure Jest with [jest-preset-angular](https://www.npmjs.com/package/jest-preset-angular)
In project`s`typings.d.ts` add
In project's `typings.d.ts` add

@@ -153,0 +153,0 @@ ```ts

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