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.0.0 to 2.1.0

36

dist/preview.js

@@ -44,11 +44,35 @@ 'use strict';

var it = exports.it = function it(desc, func) {
if (beforeEachFunc[currentStory]) beforeEachFunc[currentStory]();
var storyName = currentStory;
var pushGoodResult = function pushGoodResult() {
results[storyName].goodResults.push(desc);
};
var pushWrongResult = function pushWrongResult(e) {
console.error(storyName + ' - ' + desc + ' : ' + e);
results[storyName].wrongResults.push({ spec: desc, message: e.message });
};
var emitUpdate = function emitUpdate() {
var channel = _addons2.default.getChannel();
channel.emit(_.EVENT_ID, { results: results[storyName] });
};
var done = function done(e) {
if (e) pushWrongResult(e);else pushGoodResult();
emitUpdate();
};
if (beforeEachFunc[storyName]) beforeEachFunc[storyName]();
try {
func();
results[currentStory].goodResults.push(desc);
if (func.length) func(done);else {
func();
pushGoodResult();
}
} catch (e) {
console.error(currentStory + ' - ' + desc + ' : ' + e);
results[currentStory].wrongResults.push({ spec: desc, message: e.message });
pushWrongResult(e);
}
if (afterEachFunc[currentStory]) afterEachFunc[currentStory]();
if (afterEachFunc[storyName]) afterEachFunc[storyName]();
};

@@ -55,0 +79,0 @@

4

package.json
{
"name": "storybook-addon-specifications",
"version": "2.0.0",
"version": "2.1.0",
"description": "Add tests to your react storybook stories",

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

"peerDependencies": {
"@kadira/storybook-addons": "^1.3.0",
"@storybook/addons": "^3.0.0",
"react": "^0.14.7 || ^15.0.0",

@@ -59,0 +59,0 @@ "react-dom": "^0.14.7 || ^15.0.0"

Sorry, the diff of this file is not supported yet

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