Skip to content

Commit ae0c97d

Browse files
authored
Merge pull request #393 from stasm/strictEqual
Use assert.strictEqual
2 parents b298dfa + ae9601a commit ae0c97d

38 files changed

+519
-519
lines changed

fluent-dedent/test/blank_test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import ftl from "../src/index";
55

66
suite("blank lines", function() {
77
test("leading", function() {
8-
assert.equal(
8+
assert.strictEqual(
99
ftl`
1010
1111
foo
@@ -15,7 +15,7 @@ suite("blank lines", function() {
1515
});
1616

1717
test("middle", function() {
18-
assert.equal(
18+
assert.strictEqual(
1919
ftl`
2020
foo
2121
@@ -26,7 +26,7 @@ suite("blank lines", function() {
2626
});
2727

2828
test("trailing", function() {
29-
assert.equal(
29+
assert.strictEqual(
3030
ftl`
3131
foo
3232
@@ -36,7 +36,7 @@ suite("blank lines", function() {
3636
});
3737

3838
test("containing the same amount of spaces as the common indent", function() {
39-
assert.equal(
39+
assert.strictEqual(
4040
ftl`
4141
4242
`,
@@ -54,7 +54,7 @@ suite("blank lines", function() {
5454
});
5555

5656
test("containing too many spaces", function() {
57-
assert.equal(
57+
assert.strictEqual(
5858
ftl`
5959
6060
`,

fluent-dedent/test/content_test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import ftl from "../src/index";
55

66
suite("content lines", function() {
77
test("no indent", function () {
8-
assert.equal(
8+
assert.strictEqual(
99
ftl`
1010
foo
1111
bar
@@ -15,7 +15,7 @@ bar
1515
});
1616

1717
test("zero indent", function () {
18-
assert.equal(
18+
assert.strictEqual(
1919
ftl`
2020
foo
2121
bar
@@ -25,7 +25,7 @@ bar
2525
});
2626

2727
test("small indent", function () {
28-
assert.equal(
28+
assert.strictEqual(
2929
ftl`
3030
foo
3131
bar
@@ -35,7 +35,7 @@ bar
3535
});
3636

3737
test("same indent", function () {
38-
assert.equal(
38+
assert.strictEqual(
3939
ftl`
4040
foo
4141
bar

fluent-dedent/test/eol_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ suite("EOL at extremes", function () {
2828
});
2929

3030
test("two EOLs", function () {
31-
assert.equal(
31+
assert.strictEqual(
3232
ftl`
3333
foo
3434
`,

fluent-dedent/test/interpolation_test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import ftl from "../src/index";
55

66
suite("interpolation", function() {
77
test("single", function() {
8-
assert.equal(
8+
assert.strictEqual(
99
ftl`
1010
foo ${"bar"}
1111
`,
@@ -14,7 +14,7 @@ suite("interpolation", function() {
1414
});
1515

1616
test("multiple", function() {
17-
assert.equal(
17+
assert.strictEqual(
1818
ftl`
1919
foo ${"bar"}${"baz"}
2020
`,
@@ -23,7 +23,7 @@ suite("interpolation", function() {
2323
});
2424

2525
test("on separate lines", function() {
26-
assert.equal(
26+
assert.strictEqual(
2727
ftl`
2828
${"foo"}
2929
${"bar"}

fluent-dedent/test/mixed_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import ftl from "../src/index";
55

66
suite("mixed indent", function() {
77
test("same amount", function() {
8-
assert.equal(
8+
assert.strictEqual(
99
ftl`
1010
\t foo
1111
\t `,
@@ -14,7 +14,7 @@ suite("mixed indent", function() {
1414
});
1515

1616
test("larger than common", function() {
17-
assert.equal(
17+
assert.strictEqual(
1818
ftl`
1919
\t foo
2020
\t `,

fluent-dedent/test/tabs_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import ftl from "../src/index";
55

66
suite("tab indent", function() {
77
test("same amount", function() {
8-
assert.equal(
8+
assert.strictEqual(
99
ftl`
1010
\t\tfoo
1111
\t\t`,
@@ -14,7 +14,7 @@ suite("tab indent", function() {
1414
});
1515

1616
test("larger than common", function() {
17-
assert.equal(
17+
assert.strictEqual(
1818
ftl`
1919
\t\t\tfoo
2020
\t\t`,

fluent-dom/test/dom_localization_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ suite("translateFragment", function() {
1919

2020
await domLoc.translateFragment(frag);
2121

22-
assert.equal(elem.textContent, "Key 1");
22+
assert.strictEqual(elem.textContent, "Key 1");
2323
});
2424

2525
test("does not inject content into a node with missing translation", async function() {
@@ -33,7 +33,7 @@ suite("translateFragment", function() {
3333

3434
await domLoc.translateFragment(frag);
3535

36-
assert.equal(elem.textContent, "Original Value");
36+
assert.strictEqual(elem.textContent, "Original Value");
3737
});
3838

3939
});

fluent-dom/test/extra_text_markup_test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ suite('Localized text markup', function() {
1111
};
1212

1313
translateElement(element, translation);
14-
assert.equal(element.innerHTML, 'FOO <em>BAR</em> BAZ');
14+
assert.strictEqual(element.innerHTML, 'FOO <em>BAR</em> BAZ');
1515
});
1616

1717
test('forbidden element', function() {
@@ -22,7 +22,7 @@ suite('Localized text markup', function() {
2222
};
2323

2424
translateElement(element, translation);
25-
assert.equal(element.innerHTML, 'FOO ');
25+
assert.strictEqual(element.innerHTML, 'FOO ');
2626
});
2727

2828
test('forbidden element with text', function() {
@@ -33,7 +33,7 @@ suite('Localized text markup', function() {
3333
};
3434

3535
translateElement(element, translation);
36-
assert.equal(element.innerHTML, 'FOO BUTTON');
36+
assert.strictEqual(element.innerHTML, 'FOO BUTTON');
3737
});
3838

3939
test('nested HTML is forbidden', function() {
@@ -44,7 +44,7 @@ suite('Localized text markup', function() {
4444
};
4545

4646
translateElement(element, translation);
47-
assert.equal(element.innerHTML, 'FOO <em>BAR</em> BAZ');
47+
assert.strictEqual(element.innerHTML, 'FOO <em>BAR</em> BAZ');
4848
});
4949
});
5050

@@ -57,7 +57,7 @@ suite('Attributes of localized text markup', function() {
5757
};
5858

5959
translateElement(element, translation);
60-
assert.equal(element.innerHTML,
60+
assert.strictEqual(element.innerHTML,
6161
'FOO <em title="BAR">BAR</em>');
6262
});
6363

@@ -69,7 +69,7 @@ suite('Attributes of localized text markup', function() {
6969
};
7070

7171
translateElement(element, translation);
72-
assert.equal(element.innerHTML,
72+
assert.strictEqual(element.innerHTML,
7373
'FOO <em title="BAR">BAR</em>');
7474
});
7575

@@ -82,7 +82,7 @@ suite('Attributes of localized text markup', function() {
8282
};
8383

8484
translateElement(element, translation);
85-
assert.equal(element.innerHTML,
85+
assert.strictEqual(element.innerHTML,
8686
'<em>FOO</em>');
8787
});
8888

@@ -98,10 +98,10 @@ suite('Attributes of localized text markup', function() {
9898
};
9999

100100
translateElement(element, translationA);
101-
assert.equal(element.innerHTML,
101+
assert.strictEqual(element.innerHTML,
102102
'<em title="FOO A">FOO A</em>');
103103
translateElement(element, translationB);
104-
assert.equal(element.innerHTML,
104+
assert.strictEqual(element.innerHTML,
105105
'<em>FOO B</em>');
106106
});
107107
});

fluent-dom/test/localization_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ suite("formatMessages", function() {
1313
const loc = new Localization(["test.ftl"], mockGenerateMessages);
1414
const translations = await loc.formatMessages([{id: "key1"}]);
1515

16-
assert.equal(translations[0].value, "Key 1");
16+
assert.strictEqual(translations[0].value, "Key 1");
1717
});
1818

1919
test("returns undefined for a missing translation", async function() {
@@ -22,6 +22,6 @@ suite("formatMessages", function() {
2222

2323
// Make sure that the returned value here is `undefined`.
2424
// This allows bindings to handle missing translations.
25-
assert.equal(translations[1], undefined);
25+
assert.strictEqual(translations[1], undefined);
2626
});
2727
});

fluent-dom/test/overlay_attributes_test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ suite('Top-level attributes', function() {
1313
};
1414

1515
translateElement(element, translation);
16-
assert.equal(element.outerHTML,
16+
assert.strictEqual(element.outerHTML,
1717
'<div title="FOO"></div>');
1818
});
1919

@@ -27,7 +27,7 @@ suite('Top-level attributes', function() {
2727
};
2828

2929
translateElement(element, translation);
30-
assert.equal(element.outerHTML, '<input>');
30+
assert.strictEqual(element.outerHTML, '<input>');
3131
});
3232

3333
test('attributes do not leak on first translation', function() {
@@ -40,7 +40,7 @@ suite('Top-level attributes', function() {
4040
};
4141

4242
translateElement(element, translation);
43-
assert.equal(element.outerHTML,
43+
assert.strictEqual(element.outerHTML,
4444
'<div>FOO</div>');
4545
});
4646

@@ -58,10 +58,10 @@ suite('Top-level attributes', function() {
5858
};
5959

6060
translateElement(element, translationA);
61-
assert.equal(element.outerHTML,
61+
assert.strictEqual(element.outerHTML,
6262
'<div title="TITLE A">FOO A</div>');
6363
translateElement(element, translationB);
64-
assert.equal(element.outerHTML,
64+
assert.strictEqual(element.outerHTML,
6565
'<div>FOO B</div>');
6666
});
6767
});

0 commit comments

Comments
 (0)