@qntm-code/utils
Version:
A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.
54 lines (53 loc) • 1.39 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const src_1 = require("../../../src");
describe(`getMonthNames`, () => {
it(`Should return an array of month names`, () => {
expect((0, src_1.getMonthNames)()).toEqual([
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December',
]);
});
it(`Should return an array of month names in the locale provided`, () => {
expect((0, src_1.getMonthNames)({ locale: 'fr-FR' })).toEqual([
'janvier',
'février',
'mars',
'avril',
'mai',
'juin',
'juillet',
'août',
'septembre',
'octobre',
'novembre',
'décembre',
]);
});
it(`Should return an array of month names in the format provided`, () => {
expect((0, src_1.getMonthNames)({ format: 'short' })).toEqual([
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec',
]);
});
});