@qntm-code/utils
Version:
A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.
13 lines (12 loc) • 487 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const moment = require("moment");
const src_1 = require("../../../src");
describe(`getWeekOfYear`, () => {
it(`should get the week of the year for the given date`, () => {
expect((0, src_1.getWeekOfYear)(new Date(2023, 11, 30))).toEqual(52);
});
it(`should get the week of the year for today's date`, () => {
expect((0, src_1.getWeekOfYear)()).toEqual(moment().week());
});
});