@@ -118,13 +118,13 @@ The properties argument is identical to that for `test()`.
118
118
119
119
In many cases it is convenient to run a step in response to an event or a
120
120
callback. A convenient method of doing this is through the ` step_func ` method
121
- which returns a function that, when called runs a test step. For example
121
+ which returns a function that, when called runs a test step. For example:
122
122
123
123
``` js
124
124
document .addEventListener (" DOMContentLoaded" , t .step_func (function () {
125
125
assert_true (e .bubbles , " bubbles should be true" );
126
126
t .done ();
127
- });
127
+ })) ;
128
128
```
129
129
130
130
As a further convenience, the ` step_func ` that calls ` done() ` can instead
@@ -133,7 +133,7 @@ use `step_func_done`, as follows:
133
133
``` js
134
134
document .addEventListener (" DOMContentLoaded" , t .step_func_done (function () {
135
135
assert_true (e .bubbles , " bubbles should be true" );
136
- });
136
+ })) ;
137
137
```
138
138
139
139
For asynchronous callbacks that should never execute, ` unreached_func ` can
@@ -276,7 +276,7 @@ The test title for single page tests is always taken from `document.title`.
276
276
277
277
Functions for making assertions start ` assert_ ` . The full list of
278
278
asserts avaliable is documented in the [ asserts] ( #list-of-assertions ) section
279
- below. The general signature is
279
+ below. The general signature is:
280
280
281
281
``` js
282
282
assert_something (actual, expected, description)
@@ -286,7 +286,7 @@ although not all assertions precisely match this pattern e.g. `assert_true`
286
286
only takes ` actual ` and ` description ` as arguments.
287
287
288
288
The description parameter is used to present more useful error messages when
289
- a test fails
289
+ a test fails.
290
290
291
291
NOTE: All asserts must be located in a ` test() ` or a step of an
292
292
` async_test() ` , unless the test is a single page test. Asserts outside
@@ -300,7 +300,7 @@ In order to ensure that tests are independent, such state should be cleaned
300
300
up once the test has a result. This can be achieved by adding cleanup
301
301
callbacks to the test. Such callbacks are registered using the ` add_cleanup `
302
302
function on the test object. All registered callbacks will be run as soon as
303
- the test result is known. For example
303
+ the test result is known. For example:
304
304
305
305
``` js
306
306
test (function () {
0 commit comments