DEV: Replace equal() with strictEqual() (#14827)

This commit is contained in:
Jarek Radosz
2021-11-08 10:26:28 +01:00
committed by GitHub
parent 016aa06229
commit d162229758
263 changed files with 2827 additions and 2363 deletions

View File

@ -30,7 +30,7 @@ acceptance(
await click(".discourse-local-date");
await click(document.querySelector(".download-calendar"));
assert.equal(
assert.strictEqual(
query("#discourse-modal-title").textContent.trim(),
I18n.t("download_calendar.title"),
"it should display modal to select calendar"

View File

@ -20,25 +20,29 @@ acceptance("Local Dates - composer", function (needs) {
'[date=2017-10-23 time=01:30:00 displayedTimezone="America/Chicago" format="LLLL" calendar="off" recurring="1.weeks" timezone=" Asia/Calcutta" timezones="Europe/Paris|America/Los_Angeles"]'
);
assert.equal(getAttr("date"), "2017-10-23", "it has the correct date");
assert.equal(getAttr("time"), "01:30:00", "it has the correct time");
assert.equal(
assert.strictEqual(
getAttr("date"),
"2017-10-23",
"it has the correct date"
);
assert.strictEqual(getAttr("time"), "01:30:00", "it has the correct time");
assert.strictEqual(
getAttr("displayed-timezone"),
"America/Chicago",
"it has the correct displayed timezone"
);
assert.equal(getAttr("format"), "LLLL", "it has the correct format");
assert.equal(
assert.strictEqual(getAttr("format"), "LLLL", "it has the correct format");
assert.strictEqual(
getAttr("timezones"),
"Europe/Paris|America/Los_Angeles",
"it has the correct timezones"
);
assert.equal(
assert.strictEqual(
getAttr("recurring"),
"1.weeks",
"it has the correct recurring"
);
assert.equal(
assert.strictEqual(
getAttr("timezone"),
"Asia/Calcutta",
"it has the correct timezone"
@ -49,7 +53,11 @@ acceptance("Local Dates - composer", function (needs) {
'[date=2017-10-24 format="LL" timezone="Asia/Calcutta" timezones="Europe/Paris|America/Los_Angeles"]'
);
assert.equal(getAttr("date"), "2017-10-24", "it has the correct date");
assert.strictEqual(
getAttr("date"),
"2017-10-24",
"it has the correct date"
);
assert.notOk(getAttr("time"), "it doesn’t have time");
});
});

View File

@ -26,7 +26,7 @@ test("#format", function (assert) {
minute: 36,
timezone: PARIS,
});
assert.equal(date.format(), "2020-03-15T15:36:00.000+01:00");
assert.strictEqual(date.format(), "2020-03-15T15:36:00.000+01:00");
});
test("#unitRepetitionsBetweenDates", function (assert) {
@ -39,7 +39,7 @@ test("#unitRepetitionsBetweenDates", function (assert) {
minute: 36,
timezone: PARIS,
});
assert.equal(
assert.strictEqual(
date.unitRepetitionsBetweenDates(
"1.hour",
moment.tz("2020-02-15 15:36", SYDNEY)
@ -55,7 +55,7 @@ test("#unitRepetitionsBetweenDates", function (assert) {
minute: 36,
timezone: PARIS,
});
assert.equal(
assert.strictEqual(
date.unitRepetitionsBetweenDates(
"1.minute",
moment.tz("2020-02-15 15:36", PARIS)
@ -71,7 +71,7 @@ test("#unitRepetitionsBetweenDates", function (assert) {
minute: 36,
timezone: PARIS,
});
assert.equal(
assert.strictEqual(
date.unitRepetitionsBetweenDates(
"1.minute",
moment.tz("2020-02-15 15:37", PARIS)
@ -87,7 +87,7 @@ test("#unitRepetitionsBetweenDates", function (assert) {
minute: 36,
timezone: PARIS,
});
assert.equal(
assert.strictEqual(
date.unitRepetitionsBetweenDates(
"2.minutes",
moment.tz("2020-02-15 15:41", PARIS)
@ -112,7 +112,7 @@ test("#add", function (assert) {
assert.notOk(date.isDST());
futureLocalDate = date.add(8, "months");
assert.notOk(futureLocalDate.isDST());
assert.equal(
assert.strictEqual(
futureLocalDate.format(),
"2020-11-19T15:36:00.000+01:00",
"it correctly adds from a !isDST date to a !isDST date"
@ -128,7 +128,7 @@ test("#add", function (assert) {
assert.ok(date.isDST());
futureLocalDate = date.add(1, "year");
assert.ok(futureLocalDate.isDST());
assert.equal(
assert.strictEqual(
futureLocalDate.format(),
"2021-04-25T15:36:00.000+02:00",
"it correctly adds from a isDST date to a isDST date"
@ -144,7 +144,7 @@ test("#add", function (assert) {
assert.notOk(date.isDST());
futureLocalDate = date.add(1, "week");
assert.ok(futureLocalDate.isDST());
assert.equal(
assert.strictEqual(
futureLocalDate.format(),
"2020-04-01T15:36:00.000+02:00",
"it correctly adds from a !isDST date to a isDST date"
@ -161,7 +161,7 @@ test("#add", function (assert) {
assert.ok(date.isDST());
futureLocalDate = date.add(8, "months");
assert.notOk(futureLocalDate.isDST());
assert.equal(
assert.strictEqual(
futureLocalDate.format(),
"2020-12-01T15:36:00.000+01:00",
"it correctly adds from a isDST date to a !isDST date"

View File

@ -47,7 +47,7 @@ QUnit.assert.buildsCorrectDate = function (options, expected, message) {
);
if (expected.formated) {
this.test.assert.equal(
this.test.assert.strictEqual(
localDateBuilder.build().formated,
expected.formated,
message || "it formates the date correctly"