File size: 502 Bytes
cf86710
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { DateLib } from "../classes";

import { formatWeekNumber } from "./formatWeekNumber";

test("should return the formatted week number", () => {
  expect(formatWeekNumber(10)).toEqual("10");
});

test("should return the formatted week number with leading zero", () => {
  expect(formatWeekNumber(1)).toEqual("01");
});

test("should format with the provided numeral system", () => {
  const dateLib = new DateLib({ numerals: "arab" });
  expect(formatWeekNumber(1, dateLib)).toEqual("٠١");
});