Skip to content

Commit 379c4b1

Browse files
committed
Fix tests
1 parent 65b1816 commit 379c4b1

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
@@ -2767,7 +2767,7 @@ describe('MatrixClient', () => {
27672767
const eventId = "$def456:example.org";
27682768
const originServerTs = 4567;
27692769

2770-
http.when("GET", "/_matrix/client/v3/rooms").respond(200, (path, _content, req) => {
2770+
http.when("GET", "/_matrix/client/v1/rooms").respond(200, (path, _content, req) => {
27712771
expect(path).toEqual(`${hsUrl}/_matrix/client/v1/rooms/${encodeURIComponent(roomId)}/timestamp_to_event`);
27722772
expect(req.queryParams['dir']).toEqual(dir);
27732773
expect(req.queryParams['ts']).toEqual(timestamp);
@@ -2781,7 +2781,7 @@ describe('MatrixClient', () => {
27812781
const [result] = await Promise.all([client.getEventNearestToTimestamp(roomId, timestamp, dir), http.flushAllExpected()]);
27822782
expect(result).toBeDefined();
27832783
expect(result.event_id).toEqual(eventId);
2784-
expect(result.origin_server_ts).toMatchObject(originServerTs);
2784+
expect(result.origin_server_ts).toEqual(originServerTs);
27852785
});
27862786
});
27872787

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)