Socket
Socket
Sign inDemoInstall

@storybook/addon-jest

Package Overview
Dependencies
Maintainers
10
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.24 to 4.0.0-alpha.25

10

dist/index.js

@@ -14,9 +14,14 @@ "use strict";

var findTestResults = function findTestResults(testFiles, jestTestResults, jestTestFilesExt) {
var _upath = require("upath");
var findTestResults = function findTestResults(testFiles, jestTestResults, jestTestFilesOptions) {
return Object.values(testFiles).map(function (name) {
var fileName = "".concat(name).concat(jestTestFilesOptions.filesExt);
if (jestTestResults && jestTestResults.testResults) {
return {
fileName: fileName,
name: name,
result: jestTestResults.testResults.find(function (t) {
return new RegExp("".concat(name).concat(jestTestFilesExt)).test(t.name);
return (0, _upath.normalize)(t.name).includes(fileName);
})

@@ -27,2 +32,3 @@ };

return {
fileName: fileName,
name: name

@@ -29,0 +35,0 @@ };

@@ -17,6 +17,8 @@ "use strict";

_addons.default.addPanel('storybook/tests/panel', {
title: _react.default.createElement(_PanelTitle.default, {
channel: _addons.default.getChannel(),
api: api
}),
title: function title() {
return _react.default.createElement(_PanelTitle.default, {
channel: channel,
api: api
});
},
// eslint-disable-next-line react/prop-types

@@ -23,0 +25,0 @@ render: function render(_ref) {

9

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

@@ -34,6 +34,7 @@ "keywords": [

"@emotion/styled": "^0.10.6",
"@storybook/addons": "4.0.0-alpha.24",
"@storybook/components": "4.0.0-alpha.24",
"@storybook/addons": "4.0.0-alpha.25",
"@storybook/components": "4.0.0-alpha.25",
"global": "^4.3.2",
"prop-types": "^15.6.2",
"upath": "^1.1.0",
"util-deprecate": "^1.0.2"

@@ -44,3 +45,3 @@ },

},
"gitHead": "bdc8120ab9456b34e2f67692cc3439ac75c4ba54"
"gitHead": "155afad695926070cc6426e98d795907846f1207"
}
import addons from '@storybook/addons';
import deprecate from 'util-deprecate';
import { normalize } from 'upath';
const findTestResults = (testFiles, jestTestResults, jestTestFilesExt) =>
const findTestResults = (testFiles, jestTestResults, jestTestFilesOptions) =>
Object.values(testFiles).map(name => {
const fileName = `${name}${jestTestFilesOptions.filesExt}`;
if (jestTestResults && jestTestResults.testResults) {
return {
fileName,
name,
result: jestTestResults.testResults.find(t =>
new RegExp(`${name}${jestTestFilesExt}`).test(t.name)
),
result: jestTestResults.testResults.find(t => normalize(t.name).includes(fileName)),
};
}
return { name };
return { fileName, name };
});

@@ -16,0 +17,0 @@

@@ -10,3 +10,3 @@ import React from 'react';

addons.addPanel('storybook/tests/panel', {
title: <PanelTitle channel={addons.getChannel()} api={api} />,
title: () => <PanelTitle channel={channel} api={api} />,
// eslint-disable-next-line react/prop-types

@@ -13,0 +13,0 @@ render: ({ active }) => <Panel channel={channel} api={api} active={active} />,

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