From b0dd61c6c0645ac2ff2389e8ac6761e1a51d6474 Mon Sep 17 00:00:00 2001 From: Bartek Wrona <wrona@syncad.com> Date: Wed, 12 Mar 2025 16:13:13 +0100 Subject: [PATCH] IWorkerBeeGlobals extended by wax instance to make possible referencing wax types (like ReplyOperation etc) --- __tests__/assets/globals.d.ts | 3 +++ __tests__/assets/globals.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/__tests__/assets/globals.d.ts b/__tests__/assets/globals.d.ts index 71cae14..6a3a2c1 100644 --- a/__tests__/assets/globals.d.ts +++ b/__tests__/assets/globals.d.ts @@ -1,5 +1,7 @@ // We only want to import types here! import type beekeeperFactoryType from "@hiveio/beekeeper/web"; +import type Wax from "@hiveio/wax"; + import type WorkerBee from "../../dist/bundle/index"; export type TEnvType = "web" | "node"; @@ -8,6 +10,7 @@ export type TEnvType = "web" | "node"; export interface IWorkerBeeGlobals { beekeeperFactory: typeof beekeeperFactoryType; WorkerBee: typeof WorkerBee; + wax: typeof Wax; } declare global { diff --git a/__tests__/assets/globals.js b/__tests__/assets/globals.js index c2248da..0174ed0 100644 --- a/__tests__/assets/globals.js +++ b/__tests__/assets/globals.js @@ -2,15 +2,18 @@ globalThis.createTestFor = async function createTestFor(env) { const locWorkerBee = env === "web" ? "../../dist/bundle/index.js" : "../../dist/bundle/index.js"; const locBeekeeper = env === "web" ? "@hiveio/beekeeper/web" : "@hiveio/beekeeper/node"; + const locWax = env === "web" ? "@hiveio/wax/web" : "@hiveio/wax/node"; // Import required libraries env-dependent const wb = await import(locWorkerBee); const beekeeper = await import(locBeekeeper); + const wax = await import(locWax); // Provide results return { beekeeperFactory: beekeeper.default, - WorkerBee: wb.default + WorkerBee: wb.default, + wax }; }; -- GitLab