updated CHANGELOG
Showing
1 changed file
with
7 additions
and
7 deletions
... | @@ -66,17 +66,17 @@ casper.test.begin('Casperjs.org is navigable', 2, function suite(test) { | ... | @@ -66,17 +66,17 @@ casper.test.begin('Casperjs.org is navigable', 2, function suite(test) { |
66 | }); | 66 | }); |
67 | ``` | 67 | ``` |
68 | 68 | ||
69 | `Tester#begin()` has also `setUp()` and `tearDown()` capabilities: | 69 | `Tester#begin()` has also `setUp()` and `tearDown()` capabilities if you pass it a configuration object instead of a function: |
70 | 70 | ||
71 | ```js | 71 | ```js |
72 | var range; | ||
73 | |||
74 | casper.test.begin('range tests', 1, { | 72 | casper.test.begin('range tests', 1, { |
75 | setUp: function() { | 73 | range: [1, 2], |
76 | range = [1, 2, 3]; | 74 | |
75 | setUp: function(test) { | ||
76 | this.range.push(3); | ||
77 | }, | 77 | }, |
78 | tearDown: function() { | 78 | tearDown: function(test) { |
79 | range = undefined; | 79 | range = []; |
80 | }, | 80 | }, |
81 | test: function(test) { | 81 | test: function(test) { |
82 | test.assertEquals(range.length, 3); | 82 | test.assertEquals(range.length, 3); | ... | ... |
-
Please register or sign in to post a comment