Skip to content

Commit bc5fa48

Browse files
committed
replace assert.equal with assert.strictEqual in tests
Fixes eslint qunit/no-assert-equal
1 parent 6f66fe4 commit bc5fa48

File tree

7 files changed

+19
-16
lines changed

7 files changed

+19
-16
lines changed

tests/acceptance/cookbook-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ module('Acceptance | cookbook', function (hooks) {
1212

1313
test('visiting /cookbook', async function (assert) {
1414
await visit('/v1.10.0/cookbook/');
15-
assert.equal(currentURL(), '/v1.10.0/cookbook/');
15+
assert.strictEqual(currentURL(), '/v1.10.0/cookbook/');
1616
await click('.next-guide');
17-
assert.equal(currentURL(), '/v1.10.0/cookbook/contributing');
17+
assert.strictEqual(currentURL(), '/v1.10.0/cookbook/contributing');
1818
await click('.next-guide');
19-
assert.equal(
19+
assert.strictEqual(
2020
currentURL(),
2121
'/v1.10.0/cookbook/contributing/understanding_the_cookbook_format'
2222
);
2323
await click('.previous-guide');
24-
assert.equal(currentURL(), '/v1.10.0/cookbook/contributing');
24+
assert.strictEqual(currentURL(), '/v1.10.0/cookbook/contributing');
2525
});
2626
});

tests/acceptance/current-url-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module('Acceptance | current url', function (hooks) {
2222
test('visiting / redirects you to /release', async function (assert) {
2323
await visit('/');
2424
let page = this.owner.lookup('service:page');
25-
assert.equal(currentURL(), '/release');
25+
assert.strictEqual(currentURL(), '/release');
2626

2727
let currentVersion = page.get('currentVersion');
2828
currentVersion = currentVersion.slice(

tests/acceptance/error-page-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module('Acceptance | error page', function (hooks) {
88
test('visiting a non-existent page shows the 404 error-page', async function (assert) {
99
await visit('/v1.12.0/nonsense/route/');
1010

11-
assert.equal(currentURL(), '/v1.12.0/nonsense/route/');
11+
assert.strictEqual(currentURL(), '/v1.12.0/nonsense/route/');
1212
assert.dom('[data-test-error-page]').exists();
1313
// todo make this pass again and add a test to the template
1414
// assert.dom('[data-test-error-message]').hasText(`Ack! 404 friend, you're in the wrong place`);

tests/acceptance/meta-data-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module('Acceptance | meta data', function (hooks) {
99
await visit('/release/');
1010

1111
await click('[data-test-toc-link="Routing"]');
12-
assert.equal(currentURL(), '/release/routing');
12+
assert.strictEqual(currentURL(), '/release/routing');
1313

1414
// look up the og:title instead of title because testem modifies title https://github.com/testem/testem/issues/195
1515
assert
@@ -23,7 +23,7 @@ module('Acceptance | meta data', function (hooks) {
2323
);
2424

2525
await click('[data-test-toc-link="Defining Your Routes"]');
26-
assert.equal(currentURL(), '/release/routing/defining-your-routes');
26+
assert.strictEqual(currentURL(), '/release/routing/defining-your-routes');
2727

2828
assert
2929
.dom('head meta[property="og:title"]', document)

tests/acceptance/previous-next-links-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ module('Acceptance | previous next links', function (hooks) {
77

88
test('navigation by previous and next links', async function (assert) {
99
await visit('/v2.17.0/models/');
10-
assert.equal(currentURL(), '/v2.17.0/models/');
10+
assert.strictEqual(currentURL(), '/v2.17.0/models/');
1111
await click('.next-guide');
12-
assert.equal(currentURL(), '/v2.17.0/models/defining-models');
12+
assert.strictEqual(currentURL(), '/v2.17.0/models/defining-models');
1313
await click('.next-guide');
14-
assert.equal(currentURL(), '/v2.17.0/models/finding-records');
14+
assert.strictEqual(currentURL(), '/v2.17.0/models/finding-records');
1515
await click('.previous-guide');
16-
assert.equal(currentURL(), '/v2.17.0/models/defining-models');
16+
assert.strictEqual(currentURL(), '/v2.17.0/models/defining-models');
1717
});
1818
});

tests/acceptance/table-of-contents-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ module('Acceptance | table of contents', function (hooks) {
99
await visit('/v2.17.0/');
1010
await click('[data-test-toc-link="Routing"]');
1111
await click('[data-test-toc-link="Defining Your Routes"]');
12-
assert.equal(currentURL(), '/v2.17.0/routing/defining-your-routes');
12+
assert.strictEqual(currentURL(), '/v2.17.0/routing/defining-your-routes');
1313
});
1414
});

tests/acceptance/version-menu-test.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,21 @@ module('Acceptance | version menu when changing versions', function (hooks) {
1717
test('stays on same section', async function (assert) {
1818
await visit('/v1.13.0/getting-started/');
1919
await selectChoose('.ember-basic-dropdown-trigger', '1.12');
20-
assert.equal(currentURL(), '/v1.12.0/getting-started');
20+
assert.strictEqual(currentURL(), '/v1.12.0/getting-started');
2121
});
2222

2323
test('stays on same section and page', async function (assert) {
2424
await visit('/v3.0.0/object-model/classes-and-instances/');
2525
await selectChoose('.ember-basic-dropdown-trigger', '3.1');
26-
assert.equal(currentURL(), '/v3.1.0/object-model/classes-and-instances');
26+
assert.strictEqual(
27+
currentURL(),
28+
'/v3.1.0/object-model/classes-and-instances'
29+
);
2730
});
2831

2932
test("redirects to index page if current section/page doesn't exist in new version", async function (assert) {
3033
await visit('/v1.10.0/getting-started/using-fixtures/');
3134
await selectChoose('.ember-basic-dropdown-trigger', '1.13');
32-
assert.equal(currentURL(), '/v1.13.0');
35+
assert.strictEqual(currentURL(), '/v1.13.0');
3336
});
3437
});

0 commit comments

Comments
 (0)