Socket
Socket
Sign inDemoInstall

@storybook/addons

Package Overview
Dependencies
3
Maintainers
10
Versions
1495
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0-alpha.8 to 4.0.0-alpha.9

4

dist/make-decorator.js

@@ -35,2 +35,6 @@ 'use strict';

if (parameters && parameters.disable) {
return getStory(context);
}
if (skipIfNoParametersOrOptions && !options && !parameters) {

@@ -37,0 +41,0 @@ return getStory(context);

4

package.json
{
"name": "@storybook/addons",
"version": "4.0.0-alpha.8",
"version": "4.0.0-alpha.9",
"description": "Storybook addons store",

@@ -23,3 +23,3 @@ "keywords": [

"dependencies": {
"@storybook/channels": "4.0.0-alpha.8",
"@storybook/channels": "4.0.0-alpha.9",
"global": "^4.3.2",

@@ -26,0 +26,0 @@ "util-deprecate": "^1.0.2"

@@ -22,2 +22,6 @@ import deprecate from 'util-deprecate';

if (parameters && parameters.disable) {
return getStory(context);
}
if (skipIfNoParametersOrOptions && !options && !parameters) {

@@ -24,0 +28,0 @@ return getStory(context);

@@ -70,3 +70,3 @@ import deprecate from 'util-deprecate';

it('calls the story directly if neither are supplied and skipIfNoParametersOrOptions is true', () => {
it('calls the story directly if neither options or parameters are supplied and skipIfNoParametersOrOptions is true', () => {
const wrapper = jest.fn();

@@ -89,2 +89,20 @@ const decorator = makeDecorator({

it('calls the story directly if the disable parameter is passed to the decorator', () => {
const wrapper = jest.fn();
const decorator = makeDecorator({
wrapper,
name: 'test',
parameterName: 'test',
skipIfNoParametersOrOptions: true,
});
const story = jest.fn();
const decoratedStory = defaultDecorateStory(story, [decorator]);
const context = { disable: true };
decoratedStory(context);
expect(wrapper).not.toHaveBeenCalled();
expect(story).toHaveBeenCalled();
});
it('passes options added at story time, but with a deprecation warning', () => {

@@ -91,0 +109,0 @@ deprecatedFns = [];

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc