UNPKG

432 BTypeScriptView Raw
1import React from "react";
2
3import { grid } from "@/test/elements";
4import { render } from "@/test/render";
5
6import { Spanish } from "./Spanish";
7
8const today = new Date(2021, 10, 25);
9
10beforeAll(() => jest.setSystemTime(today));
11afterAll(() => jest.useRealTimers());
12
13beforeEach(() => {
14 render(<Spanish />);
15});
16
17test("should localize the caption in Spanish", () => {
18 expect(grid()).toHaveAccessibleName("noviembre 2021");
19});