From 57d0b182c37e21d8bdf52acbb137a028841767af Mon Sep 17 00:00:00 2001 From: Ivan Kabir Date: Mon, 12 Aug 2024 15:54:56 +0300 Subject: [PATCH] test: fix tests --- test/src/worker/browser-env/runner/test-runner/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/src/worker/browser-env/runner/test-runner/index.ts b/test/src/worker/browser-env/runner/test-runner/index.ts index 33631778..b0d1738e 100644 --- a/test/src/worker/browser-env/runner/test-runner/index.ts +++ b/test/src/worker/browser-env/runner/test-runner/index.ts @@ -697,7 +697,8 @@ describe("worker/browser-env/runner/test-runner", () => { let browser: Browser; beforeEach(() => { - global.expect = sandbox.stub() as unknown as ExpectWebdriverIO.Expect; + (global as Partial<{ expect: ExpectWebdriverIO.Expect }>).expect = + sandbox.stub() as unknown as ExpectWebdriverIO.Expect; browser = mkBrowser_(); (BrowserAgent.prototype.getBrowser as SinonStub).resolves(browser); @@ -709,7 +710,8 @@ describe("worker/browser-env/runner/test-runner", () => { describe("should return error if", () => { it("expect module is not found", done => { - global.expect = undefined as unknown as ExpectWebdriverIO.Expect; + (global as Partial<{ expect: ExpectWebdriverIO.Expect }>).expect = + undefined as unknown as ExpectWebdriverIO.Expect; const socket = mkSocket_() as BrowserViteSocket; socketClientStub.returns(socket);