From 777b82dd1c802a6863775315e1cd5ada189fa827 Mon Sep 17 00:00:00 2001 From: Marcin Gordel Date: Fri, 29 Sep 2023 13:03:30 +0200 Subject: [PATCH] test(examples): fixed unit test --- src/task/work.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/task/work.spec.ts b/src/task/work.spec.ts index 1c3ad2656..362d07de3 100644 --- a/src/task/work.spec.ts +++ b/src/task/work.spec.ts @@ -190,7 +190,7 @@ describe("Work Context", () => { describe("getWebsocketUri()", () => { it("should throw error if there is no network node", () => { - expect(context["networkNode"]).toBeUndefined(); + expect(() => context.getIp()).toThrow(new Error("There is no network in this work context")); }); it("should return websocket URI", () => { @@ -205,7 +205,7 @@ describe("Work Context", () => { describe("getIp()", () => { it("should throw error if there is no network node", () => { - expect(context["networkNode"]).toBeUndefined(); + expect(() => context.getIp()).toThrow(new Error("There is no network in this work context")); }); it("should return ip address of provider vpn network node", () => {