1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

mock datetime properly

This commit is contained in:
Kerry Archibald
2023-09-12 12:18:29 +12:00
committed by Quentin Gliech
parent f4471ad76d
commit e216e40a19
4 changed files with 11 additions and 17 deletions

View File

@@ -24,7 +24,7 @@ import DateTime from "../DateTime";
import CompatSessionDetail from "./CompatSessionDetail";
// Mock out datetime to avoid timezones/date formatting
vi.mock("./DateTime", () => {
vi.mock("../DateTime", () => {
const MockDateTime: typeof DateTime = ({ datetime }) => (
<code>{datetime.toString()}</code>
);

View File

@@ -25,7 +25,7 @@ import { OAUTH2_SESSION_FRAGMENT } from "../OAuth2Session";
import OAuth2SessionDetail from "./OAuth2SessionDetail";
// Mock out datetime to avoid timezones/date formatting
vi.mock("./DateTime", () => {
vi.mock("../DateTime", () => {
const MockDateTime: typeof DateTime = ({ datetime }) => (
<code>{datetime.toString()}</code>
);

View File

@@ -64,11 +64,9 @@ exports[`<CompatSessionDetail> > renders a compatability session details 1`] = `
<p
class="_font-body-sm-regular_1jx6b_40 _detailValue_040867"
>
<time
datetime="2023-06-29T15:35:17+12:00"
>
Thu, 29 Jun 2023, 15:35
</time>
<code>
2023-06-29T03:35:17.451292+00:00
</code>
</p>
</li>
</ul>
@@ -199,11 +197,9 @@ exports[`<CompatSessionDetail> > renders a compatability session without an ssoL
<p
class="_font-body-sm-regular_1jx6b_40 _detailValue_040867"
>
<time
datetime="2023-06-29T15:35:17+12:00"
>
Thu, 29 Jun 2023, 15:35
</time>
<code>
2023-06-29T03:35:17.451292+00:00
</code>
</p>
</li>
</ul>

View File

@@ -65,11 +65,9 @@ exports[`<OAuth2SessionDetail> > renders session details 1`] = `
<p
class="_font-body-sm-regular_1jx6b_40 _detailValue_040867"
>
<time
datetime="2023-06-29T15:35:17+12:00"
>
Thu, 29 Jun 2023, 15:35
</time>
<code>
2023-06-29T03:35:17.451292+00:00
</code>
</p>
</li>
<li