-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy path_index.browser.test.tsx
More file actions
49 lines (44 loc) · 1020 Bytes
/
_index.browser.test.tsx
File metadata and controls
49 lines (44 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import * as Module from "./_index"
const routeComponentProps = {
loaderData: { timezoneDate: "2021-01-01T00:00:00.000Z" },
params: {},
// biome-ignore lint/suspicious/noExplicitAny: Matches are not used
matches: [] as any,
}
describe("Home route", () => {
it("should render the home page text properly in english", async ({ renderStub }) => {
const { getByText } = await renderStub({
entries: [
{
id: "home",
path: "/",
Component: () => Module.default(routeComponentProps),
},
],
})
expect(
getByText("React Router is awesome!", {
exact: false,
})
).not.toBeNull()
})
it("should render the home page text properly in bosnian", async ({ renderStub }) => {
const { getByText } = await renderStub({
entries: [
{
id: "home",
path: "/",
Component: () => Module.default(routeComponentProps),
},
],
i18n: {
lng: "bs",
},
})
expect(
getByText("React Router je zakon!", {
exact: false,
})
).not.toBeNull()
})
})