Skip to content

Commit 17e07d5

Browse files
committed
Deal with qunit lint changes
1 parent 2b04bd1 commit 17e07d5

3 files changed

Lines changed: 76 additions & 87 deletions

File tree

test-app/tests/acceptance/posts-test.js

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,92 +8,82 @@ module('Acceptance: title', function (hooks) {
88
setupApplicationTest(hooks);
99

1010
test('the default configuration works', async function (assert) {
11-
assert.expect(1);
1211
await visit('/posts');
1312

14-
assert.equal(getPageTitle(), 'Posts | My App');
13+
assert.strictEqual(getPageTitle(), 'Posts | My App');
1514
});
1615

1716
test('the replace attribute works', async function (assert) {
18-
assert.expect(1);
1917
await visit('/about');
2018

21-
assert.equal(getPageTitle(), 'About My App');
19+
assert.strictEqual(getPageTitle(), 'About My App');
2220
});
2321

2422
test('custom separators work', async function (assert) {
25-
assert.expect(1);
2623
await visit('/about/authors');
2724

28-
assert.equal(getPageTitle(), 'Authors > About My App');
25+
assert.strictEqual(getPageTitle(), 'Authors > About My App');
2926
});
3027

3128
test('custom separators are inherited', async function (assert) {
32-
assert.expect(1);
3329
await visit('/about/authors/profile');
3430

35-
assert.equal(getPageTitle(), 'Profile > Authors > About My App');
31+
assert.strictEqual(getPageTitle(), 'Profile > Authors > About My App');
3632
});
3733

3834
test('multiple components in a row work', async function (assert) {
39-
assert.expect(1);
4035
await visit('/posts/rails-is-omakase');
4136

42-
assert.equal(getPageTitle(), 'Rails is Omakase | Posts | My App');
37+
assert.strictEqual(getPageTitle(), 'Rails is Omakase | Posts | My App');
4338
});
4439

4540
test('the prepend=false declaration works', async function (assert) {
46-
assert.expect(1);
4741
await visit('/authors/tomster');
4842

49-
assert.equal(getPageTitle(), 'My App | Authors < Tomster');
43+
assert.strictEqual(getPageTitle(), 'My App | Authors < Tomster');
5044
});
5145

5246
test('replace nested in prepends work', async function (assert) {
53-
assert.expect(1);
5447
await visit('/hollywood');
5548

56-
assert.equal(getPageTitle(), 'Hollywood ★ Stars everywhere');
49+
assert.strictEqual(getPageTitle(), 'Hollywood ★ Stars everywhere');
5750
});
5851

5952
test('multitoken titles work', async function (assert) {
60-
assert.expect(1);
6153
await visit('/feeds/tomster');
6254

63-
assert.equal(getPageTitle(), 'Tomster (@tomster)');
55+
assert.strictEqual(getPageTitle(), 'Tomster (@tomster)');
6456
});
6557

6658
test('loading substates are not shown', async function (assert) {
67-
assert.expect(3);
6859
await visit('/feeds/tomster');
69-
assert.equal(getPageTitle(), 'Tomster (@tomster)');
60+
assert.strictEqual(getPageTitle(), 'Tomster (@tomster)');
7061

7162
await click('#zoey');
7263
await waitUntil(() => {
7364
return find('div[data-test-substate-loading]') === null;
7465
});
75-
assert.equal(getPageTitle(), 'Zoey (@zoey)');
66+
assert.strictEqual(getPageTitle(), 'Zoey (@zoey)');
7667

7768
await click('#tomster');
7869
await waitUntil(() => {
7970
return find('div[data-test-substate-loading]') === null;
8071
});
81-
assert.equal(getPageTitle(), 'Tomster (@tomster)');
72+
assert.strictEqual(getPageTitle(), 'Tomster (@tomster)');
8273
});
8374

8475
test('front tokens work', async function (assert) {
85-
assert.expect(1);
8676
await visit('/reader');
8777

88-
assert.equal(getPageTitle(), '(10) Reader | My App');
78+
assert.strictEqual(getPageTitle(), '(10) Reader | My App');
8979
});
9080

9181
test('does not throw if no title element exist', async function (assert) {
9282
document.head.querySelectorAll('title').forEach((titleElement) => {
9383
document.head.removeChild(titleElement);
9484
});
9585
await visit('/posts');
96-
assert.equal(getPageTitle(), 'Posts | My App');
86+
assert.strictEqual(getPageTitle(), 'Posts | My App');
9787
});
9888

9989
test('`titleDidUpdate` hook is called with the new title', async function (assert) {
@@ -108,9 +98,9 @@ module('Acceptance: title', function (hooks) {
10898
this.owner.register('service:page-title', ExtendedPageTitleService);
10999

110100
await visit('/posts');
111-
assert.equal(currentTitle, 'Posts | My App');
101+
assert.strictEqual(currentTitle, 'Posts | My App');
112102

113103
await visit('/posts/rails-is-omakase');
114-
assert.equal(currentTitle, 'Rails is Omakase | Posts | My App');
104+
assert.strictEqual(currentTitle, 'Rails is Omakase | Posts | My App');
115105
});
116106
});

test-app/tests/fastboot/title-test.js

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,88 +6,84 @@ module('FastBoot: title', function (hooks) {
66
setup(hooks);
77

88
test('the default configuration works', async function (assert) {
9-
assert.expect(1);
109
let { htmlDocument } = await visit('/posts');
1110

12-
assert.equal(getPageTitle(htmlDocument), 'Posts | My App');
11+
assert.strictEqual(getPageTitle(htmlDocument), 'Posts | My App');
1312
});
1413

1514
test('the replace attribute works', async function (assert) {
16-
assert.expect(1);
1715
let { htmlDocument } = await visit('/about');
1816

19-
assert.equal(getPageTitle(htmlDocument), 'About My App');
17+
assert.strictEqual(getPageTitle(htmlDocument), 'About My App');
2018
});
2119

2220
test('custom separators work', async function (assert) {
23-
assert.expect(1);
2421
let { htmlDocument } = await visit('/about/authors');
2522

26-
assert.equal(getPageTitle(htmlDocument), 'Authors > About My App');
23+
assert.strictEqual(getPageTitle(htmlDocument), 'Authors > About My App');
2724
});
2825

2926
test('custom separators are inherited', async function (assert) {
30-
assert.expect(1);
3127
let { htmlDocument } = await visit('/about/authors/profile');
3228

33-
assert.equal(
29+
assert.strictEqual(
3430
getPageTitle(htmlDocument),
35-
'Profile > Authors > About My App'
31+
'Profile > Authors > About My App',
3632
);
3733
});
3834

3935
test('rendering only single title element', async function (assert) {
40-
assert.expect(2);
4136
let { htmlDocument } = await visit('/fastboot/multiple/titles');
4237

4338
// Since for our non-fastboot vs fastboot tests we keep original <title>
4439
// element in index.html, we simply filter it out.
4540
let numberOfTitleElements = htmlDocument.head.querySelectorAll(
46-
'title:not([data-test-ignore-for-fastboot-tests])'
41+
'title:not([data-test-ignore-for-fastboot-tests])',
4742
);
4843

49-
assert.equal(numberOfTitleElements.length, 1);
50-
assert.equal(
44+
assert.strictEqual(numberOfTitleElements.length, 1);
45+
assert.strictEqual(
5146
getPageTitle(htmlDocument),
52-
'Titles | Multiple | Fastboot | My App'
47+
'Titles | Multiple | Fastboot | My App',
5348
);
5449
});
5550

5651
test('multiple components in a row work', async function (assert) {
57-
assert.expect(1);
5852
let { htmlDocument } = await visit('/posts/rails-is-omakase');
5953

60-
assert.equal(
54+
assert.strictEqual(
6155
getPageTitle(htmlDocument),
62-
'Rails is Omakase | Posts | My App'
56+
'Rails is Omakase | Posts | My App',
6357
);
6458
});
6559

6660
test('the prepend=false declaration works', async function (assert) {
67-
assert.expect(1);
6861
let { htmlDocument } = await visit('/authors/tomster');
6962

70-
assert.equal(getPageTitle(htmlDocument), 'My App | Authors < Tomster');
63+
assert.strictEqual(
64+
getPageTitle(htmlDocument),
65+
'My App | Authors < Tomster',
66+
);
7167
});
7268

7369
test('replace nested in prepends work', async function (assert) {
74-
assert.expect(1);
7570
let { htmlDocument } = await visit('/hollywood');
7671

77-
assert.equal(getPageTitle(htmlDocument), 'Hollywood ★ Stars everywhere');
72+
assert.strictEqual(
73+
getPageTitle(htmlDocument),
74+
'Hollywood ★ Stars everywhere',
75+
);
7876
});
7977

8078
test('multitoken titles work', async function (assert) {
81-
assert.expect(1);
8279
let { htmlDocument } = await visit('/feeds/tomster');
8380

84-
assert.equal(getPageTitle(htmlDocument), 'Tomster (@tomster)');
81+
assert.strictEqual(getPageTitle(htmlDocument), 'Tomster (@tomster)');
8582
});
8683

8784
test('front tokens work', async function (assert) {
88-
assert.expect(1);
8985
let { htmlDocument } = await visit('/reader');
9086

91-
assert.equal(getPageTitle(htmlDocument), '(10) Reader | My App');
87+
assert.strictEqual(getPageTitle(htmlDocument), '(10) Reader | My App');
9288
});
9389
});

0 commit comments

Comments
 (0)