Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kabir-Ivan committed Aug 15, 2024
1 parent 6573e69 commit 57d0b18
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/src/worker/browser-env/runner/test-runner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 57d0b18

Please sign in to comment.