You've already forked authentication-service
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:
committed by
Quentin Gliech
parent
f4471ad76d
commit
e216e40a19
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user