Cleanup test descriptions

This commit is contained in:
rejas
2020-07-18 22:16:44 +02:00
parent 8b1d1671f7
commit 8fa858ca8c
2 changed files with 17 additions and 17 deletions

View File

@@ -32,54 +32,54 @@ describe("Functions into modules/default/calendar/calendar.js", function () {
});
describe("getLocaleSpecification", function () {
it("Should return a valid moment.LocaleSpecification for a 12-hour format", function () {
it("should return a valid moment.LocaleSpecification for a 12-hour format", function () {
expect(Module.definitions.calendar.getLocaleSpecification(12)).to.deep.equal({ longDateFormat: { LT: "h:mm A" } });
});
it("Should return a valid moment.LocaleSpecification for a 24-hour format", function () {
it("should return a valid moment.LocaleSpecification for a 24-hour format", function () {
expect(Module.definitions.calendar.getLocaleSpecification(24)).to.deep.equal({ longDateFormat: { LT: "HH:mm" } });
});
it("Should return the current system locale when called without timeFormat number", function () {
it("should return the current system locale when called without timeFormat number", function () {
expect(Module.definitions.calendar.getLocaleSpecification()).to.deep.equal({ longDateFormat: { LT: moment.localeData().longDateFormat("LT") } });
});
it("Should return a 12-hour longDateFormat when using the 'en' locale", function () {
it("should return a 12-hour longDateFormat when using the 'en' locale", function () {
var localeBackup = moment.locale();
moment.locale("en");
expect(Module.definitions.calendar.getLocaleSpecification()).to.deep.equal({ longDateFormat: { LT: "h:mm A" } });
moment.locale(localeBackup);
});
it("Should return a 12-hour longDateFormat when using the 'au' locale", function () {
it("should return a 12-hour longDateFormat when using the 'au' locale", function () {
var localeBackup = moment.locale();
moment.locale("au");
expect(Module.definitions.calendar.getLocaleSpecification()).to.deep.equal({ longDateFormat: { LT: "h:mm A" } });
moment.locale(localeBackup);
});
it("Should return a 12-hour longDateFormat when using the 'eg' locale", function () {
it("should return a 12-hour longDateFormat when using the 'eg' locale", function () {
var localeBackup = moment.locale();
moment.locale("eg");
expect(Module.definitions.calendar.getLocaleSpecification()).to.deep.equal({ longDateFormat: { LT: "h:mm A" } });
moment.locale(localeBackup);
});
it("Should return a 24-hour longDateFormat when using the 'nl' locale", function () {
it("should return a 24-hour longDateFormat when using the 'nl' locale", function () {
var localeBackup = moment.locale();
moment.locale("nl");
expect(Module.definitions.calendar.getLocaleSpecification()).to.deep.equal({ longDateFormat: { LT: "HH:mm" } });
moment.locale(localeBackup);
});
it("Should return a 24-hour longDateFormat when using the 'fr' locale", function () {
it("should return a 24-hour longDateFormat when using the 'fr' locale", function () {
var localeBackup = moment.locale();
moment.locale("fr");
expect(Module.definitions.calendar.getLocaleSpecification()).to.deep.equal({ longDateFormat: { LT: "HH:mm" } });
moment.locale(localeBackup);
});
it("Should return a 24-hour longDateFormat when using the 'uk' locale", function () {
it("should return a 24-hour longDateFormat when using the 'uk' locale", function () {
var localeBackup = moment.locale();
moment.locale("uk");
expect(Module.definitions.calendar.getLocaleSpecification()).to.deep.equal({ longDateFormat: { LT: "HH:mm" } });