Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

storybook-addon-specifications

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storybook-addon-specifications - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

18

dist/containers/Specifications/index.js

@@ -41,5 +41,15 @@ "use strict";

_this.state = { results: { wrongResults: [], goodResults: [] } };
_this._listener = function (d) {
return _this.setState({ results: d.results });
_this.state = { storyName: null, results: { wrongResults: [], goodResults: [] } };
_this._listener = function (_ref2) {
var asyncResultsUpdate = _ref2.asyncResultsUpdate,
storyName = _ref2.storyName,
results = _ref2.results;
if (asyncResultsUpdate) {
if (storyName === _this.state.storyName) {
_this.setState({ results: results });
}
} else {
_this.setState({ storyName: storyName, results: results });
}
};

@@ -56,3 +66,3 @@ return _this;

this.props.api.onStory(function (data) {
_this2.setState({ results: { wrongResults: [], goodResults: [] } });
return _this2.setState({ storyName: null, results: { wrongResults: [], goodResults: [] } });
});

@@ -59,0 +69,0 @@ }

@@ -26,3 +26,3 @@ 'use strict';

var channel = _addons2.default.getChannel();
channel.emit(_.EVENT_ID, { results: results[storyName] });
channel.emit(_.EVENT_ID, { storyName: storyName, results: results[storyName] });
}

@@ -32,11 +32,5 @@

currentStory = storyName;
results[currentStory] = {
goodResults: [],
wrongResults: []
};
results[currentStory] = { goodResults: [], wrongResults: [] };
func();
if (afterFunc[currentStory]) afterFunc[currentStory]();
return storyName;

@@ -57,5 +51,5 @@ };

var emitUpdate = function emitUpdate() {
var emitAsyncResultsUpdate = function emitAsyncResultsUpdate() {
var channel = _addons2.default.getChannel();
channel.emit(_.EVENT_ID, { results: results[storyName] });
channel.emit(_.EVENT_ID, { asyncResultsUpdate: true, storyName: storyName, results: results[storyName] });
};

@@ -65,3 +59,3 @@

if (e) pushWrongResult(e);else pushGoodResult();
emitUpdate();
emitAsyncResultsUpdate();
};

@@ -68,0 +62,0 @@

{
"name": "storybook-addon-specifications",
"version": "2.1.0",
"version": "2.1.1",
"description": "Add tests to your react storybook stories",

@@ -36,3 +36,3 @@ "main": "dist/index.js",

"babel-preset-stage-0": "^6.5.0",
"chai": "^3.5.0",
"chai": "^4.0.2",
"enzyme": "^2.4.1",

@@ -49,5 +49,5 @@ "expect": "^1.20.2",

"rimraf": "^2.5.4",
"@storybook/react": "3.0.0",
"@storybook/ui": "3.0.0",
"@storybook/addons": "3.0.0"
"@storybook/react": "3.1.5",
"@storybook/ui": "3.1.5",
"@storybook/addons": "3.1.5"
},

@@ -54,0 +54,0 @@ "dependencies": {

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