Fix js-sdk types for TImestampToEventResponse (#11928)

* Fix js-sdk types for TImestampToEventResponse

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update DateSeparator-test.tsx

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2023-11-24 11:40:07 +00:00 committed by GitHub
parent ee485ffcfd
commit 6a6deea7d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -170,7 +170,7 @@ describe("DateSeparator", () => {
const returnedEventId = "$abc"; const returnedEventId = "$abc";
mockClient.timestampToEvent.mockResolvedValue({ mockClient.timestampToEvent.mockResolvedValue({
event_id: returnedEventId, event_id: returnedEventId,
origin_server_ts: String(returnedDate.getTime()), origin_server_ts: returnedDate.getTime(),
} satisfies TimestampToEventResponse); } satisfies TimestampToEventResponse);
const jumpToXButton = await screen.findByTestId(testCase.jumpButtonTestId); const jumpToXButton = await screen.findByTestId(testCase.jumpButtonTestId);
fireEvent.click(jumpToXButton); fireEvent.click(jumpToXButton);
@ -207,7 +207,7 @@ describe("DateSeparator", () => {
// Jump to "last week" // Jump to "last week"
mockClient.timestampToEvent.mockResolvedValue({ mockClient.timestampToEvent.mockResolvedValue({
event_id: "$abc", event_id: "$abc",
origin_server_ts: "0", origin_server_ts: 0,
}); });
const jumpToLastWeekButton = await screen.findByTestId("jump-to-date-last-week"); const jumpToLastWeekButton = await screen.findByTestId("jump-to-date-last-week");
fireEvent.click(jumpToLastWeekButton); fireEvent.click(jumpToLastWeekButton);