UNPKG

520 BTypeScriptView Raw
1import React from "react";
2
3import { render, screen } from "@/test/render";
4
5import { NumberingSystem } from "./NumberingSystem";
6
7const today = new Date(2021, 10, 25);
8
9beforeAll(() => jest.setSystemTime(today));
10afterAll(() => jest.useRealTimers());
11
12beforeEach(() => {
13 render(<NumberingSystem />);
14});
15
16test("should localize the days", () => {
17 expect(screen.getByText("أحد")).toBeInTheDocument();
18});
19test("should localize the week numbers", () => {
20 expect(screen.getByText("٤٥")).toBeInTheDocument();
21});