Skip to content

Commit 703e625

Browse files
Half-ShotAndrewFerr
authored andcommitted
Fix tests
1 parent cf05059 commit 703e625

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/MatrixClientTest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2769,7 +2769,7 @@ describe('MatrixClient', () => {
27692769
const eventId = "$def456:example.org";
27702770
const originServerTs = 4567;
27712771

2772-
http.when("GET", "/_matrix/client/v3/rooms").respond(200, (path, _content, req) => {
2772+
http.when("GET", "/_matrix/client/v1/rooms").respond(200, (path, _content, req) => {
27732773
expect(path).toEqual(`${hsUrl}/_matrix/client/v1/rooms/${encodeURIComponent(roomId)}/timestamp_to_event`);
27742774
expect(req.queryParams['dir']).toEqual(dir);
27752775
expect(req.queryParams['ts']).toEqual(timestamp);
@@ -2783,7 +2783,7 @@ describe('MatrixClient', () => {
27832783
const [result] = await Promise.all([client.getEventNearestToTimestamp(roomId, timestamp, dir), http.flushAllExpected()]);
27842784
expect(result).toBeDefined();
27852785
expect(result.event_id).toEqual(eventId);
2786-
expect(result.origin_server_ts).toMatchObject(originServerTs);
2786+
expect(result.origin_server_ts).toEqual(originServerTs);
27872787
});
27882788
});
27892789

test/SynapseAdminApisTest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ describe('SynapseAdminApis', () => {
545545
http.when("GET", "/_synapse/admin/v1/rooms").respond(200, (path, _content, req) => {
546546
expect(path).toEqual(`${hsUrl}/_synapse/admin/v1/rooms/${encodeURIComponent(roomId)}/timestamp_to_event`);
547547
expect(req.queryParams['dir']).toEqual(dir);
548-
expect(req.queryParams['ts']).toEqual(timestamp.toString());
548+
expect(req.queryParams['ts']).toEqual(timestamp);
549549

550550
return {
551551
event_id: eventId,
@@ -556,7 +556,7 @@ describe('SynapseAdminApis', () => {
556556
const [result] = await Promise.all([client.getEventNearestToTimestamp(roomId, timestamp, dir), http.flushAllExpected()]);
557557
expect(result).toBeDefined();
558558
expect(result.event_id).toEqual(eventId);
559-
expect(result.origin_server_ts).toMatchObject(originServerTs);
559+
expect(result.origin_server_ts).toEqual(originServerTs);
560560
});
561561
});
562562
});

0 commit comments

Comments
 (0)