@storybook/testing-library
Advanced tools
Comparing version 0.2.0--canary.43.6cfe2cc.0 to 0.2.0--canary.46.dbbc187.0
@@ -151,13 +151,9 @@ "use strict"; | ||
// 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)); | ||
}); | ||
// 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))); | ||
} | ||
get hasTransport() { | ||
return this.transports.length > 0; | ||
return !!this.transport; | ||
} | ||
@@ -171,5 +167,3 @@ addListener(eventName, listener) { | ||
let handler = () => { | ||
this.transports.forEach((t) => { | ||
t.send(event, options); | ||
}), this.handleEvent(event); | ||
this.transport && this.transport.send(event, options), this.handleEvent(event); | ||
}; | ||
@@ -224,6 +218,3 @@ this.isAsync ? setImmediate(handler) : handler(); | ||
// node_modules/@storybook/channels/dist/index.mjs | ||
var { CONFIG_TYPE } = scope; | ||
// node_modules/@storybook/preview-api/dist/chunk-SPTC5DZG.mjs | ||
// node_modules/@storybook/preview-api/dist/chunk-BOMSN7HZ.mjs | ||
function mockChannel() { | ||
@@ -445,3 +436,3 @@ let transport = { setHandler: () => { | ||
} | ||
let hasPrevious = logItems.some((item) => item.status === "done" || item.status === "error"), payload = { controlStates: { start: hasPrevious, back: hasPrevious, goto: !0, next: isPlaying, end: isPlaying }, logItems, pausedAt }; | ||
let hasPrevious = logItems.some((item) => ["done", "error"].includes(item.status)), payload = { controlStates: { start: hasPrevious, back: hasPrevious, goto: !0, next: isPlaying, end: isPlaying }, logItems, pausedAt }; | ||
this.channel.emit(EVENTS.SYNC, payload); | ||
@@ -448,0 +439,0 @@ }; |
{ | ||
"name": "@storybook/testing-library", | ||
"version": "0.2.0--canary.43.6cfe2cc.0", | ||
"version": "0.2.0--canary.46.dbbc187.0", | ||
"description": "Instrumented version of Testing Library for Storybook Interactions", | ||
@@ -27,9 +27,9 @@ "repository": { | ||
"dependencies": { | ||
"@testing-library/dom": "^9.3.1", | ||
"@testing-library/user-event": "^14.4.3", | ||
"@testing-library/dom": "^9.0.0", | ||
"@testing-library/user-event": "^14.0.0", | ||
"ts-dedent": "^2.2.0" | ||
}, | ||
"devDependencies": { | ||
"@storybook/client-logger": "next", | ||
"@storybook/instrumenter": "next", | ||
"@storybook/client-logger": "^7.0.0", | ||
"@storybook/instrumenter": "^7.0.0", | ||
"@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
65709
1162