Skip to content

Commit

Permalink
use jsdom instead of node test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
toger5 committed Feb 17, 2025
1 parent 7125d45 commit 3d46d05
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@casualbot/jest-sonar-reporter": "2.2.7",
"@jest/environment": "^29.7.0",
"@peculiar/webcrypto": "^1.4.5",
"@stylistic/eslint-plugin": "^3.0.0",
"@types/bs58": "^4.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { type Focus, type LivekitFocusActive, type SessionMembershipData } from
import { LegacyMembershipManager } from "../../../src/matrixrtc/MembershipManager";
import { makeMockClient, makeMockRoom, membershipTemplate, mockCallMembership, type MockClient } from "./mocks";
import { flushPromises } from "../../test-utils/flushPromises";

function waitForMockCall(method: any, returnVal?: any) {
return new Promise<void>((resolve) => {
(method as Mock).mockImplementation(() => {
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/matrixrtc/testEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ It is very specific to the MembershipManager.spec.ts file and introduces the fol
in their test name.
*/

import { TestEnvironment } from "jest-environment-node";
import { TestEnvironment } from "jest-environment-jsdom";
import { type JestEnvironmentConfig, type EnvironmentContext } from "@jest/environment";

import { logger } from "../../../src/logger";
Expand Down

0 comments on commit 3d46d05

Please sign in to comment.