|
1 | | -test('myMethod test', function() { |
2 | | - equal(myMethod(), 123, 'myMethod returns right result'); |
3 | | - equal(myMethod(), 321, 'this should trigger an error'); |
| 1 | +test('myMethod test', function(assert) { |
| 2 | + assert.equal(myMethod(), 123, 'myMethod returns right result'); |
| 3 | + assert.equal(myMethod(), 321, 'this should trigger an error'); |
4 | 4 | }); |
5 | 5 |
|
6 | | -test('myAsyncMethod test', function() { |
7 | | - ok(true, 'myAsyncMethod started'); |
| 6 | +test('myAsyncMethod test', function(assert) { |
| 7 | + var done = assert.async(); |
| 8 | + assert.expect(3); |
8 | 9 |
|
9 | | - stop(); |
10 | | - expect(3); |
| 10 | + assert.ok(true, 'myAsyncMethod started'); |
11 | 11 |
|
12 | 12 | myAsyncMethod(function(data) { |
13 | | - equal(data, 123, 'myAsyncMethod returns right result'); |
14 | | - equal(data, 321, 'this should trigger an error'); |
15 | | - start(); |
| 13 | + assert.equal(data, 123, 'myAsyncMethod returns right result'); |
| 14 | + assert.equal(data, 321, 'this should trigger an error'); |
| 15 | + done(); |
16 | 16 | }); |
17 | 17 | }); |
18 | 18 |
|
19 | | -test('circular reference', function() { |
20 | | - equal(global, global, 'test global'); |
| 19 | +test('circular reference', function(assert) { |
| 20 | + assert.equal(global, global, 'test global'); |
21 | 21 | }); |
22 | 22 |
|
23 | | -test('use original Date', function() { |
| 23 | +test('use original Date', function(assert) { |
24 | 24 | var timekeeper = require('timekeeper'); |
25 | 25 |
|
26 | 26 | timekeeper.travel(Date.now() - 1000000); |
27 | 27 |
|
28 | | - ok(true, 'date modified'); |
| 28 | + assert.ok(true, 'date modified'); |
29 | 29 | }); |
0 commit comments