@lvce-editor/test-worker 14.18.0 → 14.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.d.ts CHANGED
@@ -331,6 +331,7 @@ interface ChatDebug {
331
331
  readonly setTimelineRangePreset: (value: string) => Promise<void>;
332
332
  readonly shouldHavePayload: (expectedPayload: unknown) => Promise<void>;
333
333
  readonly shouldHavePayload2: (expectedPayload: unknown) => Promise<void>;
334
+ readonly shouldHaveResponse: (expectedPayload: unknown) => Promise<void>;
334
335
  readonly toggleHeadersSection: (sectionId: string) => Promise<void>;
335
336
  readonly useDevtoolsLayout: () => Promise<void>;
336
337
  }
@@ -2277,6 +2277,15 @@ const shouldHavePayload2 = async expectedPayload => {
2277
2277
  throw new ChatDebugShouldHavePayloadError(expectedPayload, actualPayload, error);
2278
2278
  }
2279
2279
  };
2280
+ const shouldHaveResponse = async expectedPayload => {
2281
+ const actualPayload = await invoke('ChatDebug.getResponse');
2282
+ try {
2283
+ assertPayloadMatches(actualPayload, expectedPayload, 'response');
2284
+ } catch (error) {
2285
+ // TODO maybe rename class
2286
+ throw new ChatDebugShouldHavePayloadError(expectedPayload, actualPayload, error);
2287
+ }
2288
+ };
2280
2289
  const handleInput$7 = async (name, value, checked) => {
2281
2290
  await invoke('ChatDebug.handleInput', name, value, checked);
2282
2291
  };
@@ -2392,6 +2401,7 @@ const ChatDebug = {
2392
2401
  setTimelineRangePreset,
2393
2402
  shouldHavePayload,
2394
2403
  shouldHavePayload2,
2404
+ shouldHaveResponse,
2395
2405
  toggleHeadersSection,
2396
2406
  useDevtoolsLayout
2397
2407
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "14.18.0",
3
+ "version": "14.20.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",