Skip to content

Commit 493919d

Browse files
committed
remove some assert.expect, instead use await
1 parent ce9adeb commit 493919d

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed

tests/acceptance/index-test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ module('Acceptance - Todo Index', function(hooks) {
1616
server.shutdown();
1717
});
1818

19-
test('Should showo todos', function(assert) {
20-
assert.expect(1);
21-
visit("/todos/remote").then(function() {
22-
assert.equal(findAll(".todo").length, 10);
23-
});
19+
test('Should showo todos', async function(assert) {
20+
await visit("/todos/remote");
21+
22+
assert.equal(findAll(".todo").length, 10)
2423
});
2524
});

tests/acceptance/infinite-test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ let todosTestLocal = function(name, f) {
1010
test(name, async function(assert) {
1111
await visit("/todos/infinite");
1212

13-
f(assert);
13+
await f(assert);
1414
});
1515
};
1616

1717
let todosTestRemote = function(name, f) {
1818
test(name, async function(assert) {
1919
await visit("/todos/infinite-remote");
2020

21-
f(assert);
21+
await f(assert);
2222
});
2323
};
2424

@@ -28,7 +28,6 @@ let runTests = function(todosTest) {
2828
});
2929

3030
todosTest("next page", async function(assert) {
31-
assert.expect(2);
3231
hasTodos(assert,10);
3332

3433
await click(".infinite .next a");

tests/acceptance/pagination-test.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,13 @@ let createTests = function(todosTest) {
4848
});
4949

5050
todosTest("clicking page 2", async function(assert) {
51-
assert.expect(5);
52-
5351
await clickPage(2);
5452
hasTodos(assert,10);
5553
hasActivePage(assert,2);
5654
});
5755

5856

5957
todosTest("clicking page 4", async function(assert) {
60-
assert.expect(7);
61-
6258
await clickPage(4);
6359
hasTodos(assert,3);
6460
hasActivePage(assert,4);
@@ -82,8 +78,6 @@ let createTests = function(todosTest) {
8278
// },2);
8379

8480
todosTest("next button - proper buttons visible", function(assert) {
85-
assert.expect(6);
86-
8781
hasActivePage(assert,1);
8882
hasButtons(assert,{
8983
prev: false,
@@ -92,8 +86,6 @@ let createTests = function(todosTest) {
9286
});
9387

9488
todosTest("click next", async function(assert) {
95-
assert.expect(7);
96-
9789
await clickPage("next");
9890
hasButtons(assert,{
9991
prev: true,
@@ -104,8 +96,6 @@ let createTests = function(todosTest) {
10496
});
10597

10698
todosTest("click prev", async function(assert) {
107-
assert.expect(7);
108-
10999
await clickPage(2);
110100
await clickPage("prev");
111101
hasButtons(assert,{
@@ -117,8 +107,6 @@ let createTests = function(todosTest) {
117107
});
118108

119109
todosTest("click next on last page and not increment", async function(assert) {
120-
//assert.expect(5);
121-
122110
await clickPage(4);
123111
await clickPage("next");
124112
await clickPage("next");
@@ -130,8 +118,6 @@ let createTests = function(todosTest) {
130118
});
131119

132120
todosTest("click prev on first page and not decrement", async function(assert) {
133-
assert.expect(5);
134-
135121
await clickPage("prev");
136122
await clickPage("prev");
137123
hasTodos(assert,10);

0 commit comments

Comments
 (0)