@storybook/testing-library
Advanced tools
Comparing version 0.2.0-future.0 to 0.2.0-future.1
@@ -151,9 +151,13 @@ "use strict"; | ||
// node_modules/@storybook/channels/dist/index.mjs | ||
var generateRandomId = () => Math.random().toString(16).slice(2), Channel = class { | ||
constructor({ transport, async = !1 } = {}) { | ||
this.sender = generateRandomId(), this.events = {}, this.data = {}, this.transport = void 0, this.isAsync = async, transport && (this.transport = transport, this.transport.setHandler((event) => this.handleEvent(event))); | ||
// node_modules/@storybook/channels/dist/chunk-NH5GSF3H.mjs | ||
var isMulti = (args) => args.transports !== void 0, generateRandomId = () => Math.random().toString(16).slice(2), Channel = class { | ||
constructor(input = {}) { | ||
this.sender = generateRandomId(), this.events = {}, this.data = {}, this.transports = [], this.isAsync = input.async || !1, isMulti(input) ? (this.transports = input.transports || [], this.transports.forEach((t) => { | ||
t.setHandler((event) => this.handleEvent(event)); | ||
})) : this.transports = input.transport ? [input.transport] : [], this.transports.forEach((t) => { | ||
t.setHandler((event) => this.handleEvent(event)); | ||
}); | ||
} | ||
get hasTransport() { | ||
return !!this.transport; | ||
return this.transports.length > 0; | ||
} | ||
@@ -167,3 +171,5 @@ addListener(eventName, listener) { | ||
let handler = () => { | ||
this.transport && this.transport.send(event, options), this.handleEvent(event); | ||
this.transports.forEach((t) => { | ||
t.send(event, options); | ||
}), this.handleEvent(event); | ||
}; | ||
@@ -218,3 +224,6 @@ this.isAsync ? setImmediate(handler) : handler(); | ||
// node_modules/@storybook/preview-api/dist/chunk-BOMSN7HZ.mjs | ||
// node_modules/@storybook/channels/dist/index.mjs | ||
var { CONFIG_TYPE } = scope; | ||
// node_modules/@storybook/preview-api/dist/chunk-SPTC5DZG.mjs | ||
function mockChannel() { | ||
@@ -221,0 +230,0 @@ let transport = { setHandler: () => { |
{ | ||
"name": "@storybook/testing-library", | ||
"version": "0.2.0-future.0", | ||
"version": "0.2.0-future.1", | ||
"description": "Instrumented version of Testing Library for Storybook Interactions", | ||
@@ -32,4 +32,4 @@ "repository": { | ||
"devDependencies": { | ||
"@storybook/client-logger": "future", | ||
"@storybook/instrumenter": "future", | ||
"@storybook/client-logger": "next", | ||
"@storybook/instrumenter": "next", | ||
"@auto-it/first-time-contributor": "^10.37.6", | ||
@@ -36,0 +36,0 @@ "@auto-it/released": "^10.37.6", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
68320
1193
0