5
<title>Example: Array Processing</title>
6
<link rel="stylesheet" href="http://yui.yahooapis.com/3.4.0pr3/build/cssgrids/grids-min.css">
7
<link rel="stylesheet" href="../assets/css/main.css">
8
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
9
<script src="../../build/yui/yui-min.js"></script>
14
<h1>Example: Array Processing</h1>
17
<a href="#toc" class="jump">Jump to Table of Contents</a>
21
<div id="main" class="yui3-u">
22
<div class="content"><div class="intro">
23
<p>This example shows how to use the <a href="index.html#arrayassert"><code>ArrayAssert</code></a> object, which
24
contains assertions designed to be used specifically with JavaScript Arrays and array-like objects.</p>
27
<div class="example yui3-skin-sam">
33
#testLogger .yui3-console .yui3-console-title {
41
#testLogger .yui3-console .yui3-console-entry-meta {
45
.yui3-skin-sam .yui3-console-entry-pass .yui3-console-entry-cat {
51
<div id="testLogger"></div>
54
YUI().use('node', 'console', 'test', function (Y) {
56
Y.namespace("example.test");
58
Y.example.test.ArrayTestCase = new Y.Test.Case({
60
//the name of the test case - if not provided, one is automatically generated
63
//-------------------------------------------------------------------------
65
//-------------------------------------------------------------------------
68
* The setUp() method is used to setup data that necessary for a test to
69
* run. This method is called immediately before each test method is run,
70
* so it is run as many times as there are test methods.
73
this.data = new Array (0,1,2,3,4,5);
77
* The tearDown() method is used to clean up the initialization that was done
78
* in the setUp() method. Ideally, it should free up all memory allocated in
79
* setUp(), anticipating any possible changes to the data. This method is called
80
* immediately after each test method is run.
82
tearDown : function () {
86
//-------------------------------------------------------------------------
87
// Basic tests - all method names must begin with "test"
88
//-------------------------------------------------------------------------
91
* Test the push() method.
93
testPush : function() {
96
var ArrayAssert = Y.ArrayAssert;
98
//do whatever data manipulation is necessary
101
//array-specific assertions
102
ArrayAssert.isNotEmpty(this.data, "Array should not be empty.");
103
ArrayAssert.contains(6, this.data, "Array should contain 6.");
104
ArrayAssert.indexOf(6, this.data, 6, "The value in position 6 should be 6.");
106
//check that all the values are there
107
ArrayAssert.itemsAreEqual([0,1,2,3,4,5,6], this.data, "Arrays should be equal.");
112
* Test the pop() method.
114
testPop : function() {
117
var Assert = Y.Assert;
118
var ArrayAssert = Y.ArrayAssert;
120
//do whatever data manipulation is necessary
121
var value = this.data.pop();
123
//array shouldn't be empty
124
ArrayAssert.isNotEmpty(this.data, "Array should not be empty.");
126
//basic equality assertion - expected value, actual value, optional error message
127
Assert.areEqual(5, this.data.length, "Array should have 5 items.");
128
Assert.areEqual(5, value, "Value should be 5.");
130
ArrayAssert.itemsAreSame([0,1,2,3,4], this.data, "Arrays should be equal.");
134
* Test the reverse() method.
136
testReverse : function() {
139
var ArrayAssert = Y.ArrayAssert;
141
//do whatever data manipulation is necessary
142
this.data = this.data.reverse();
144
ArrayAssert.itemsAreEqual([5,4,3,2,1,0], this.data, "Arrays should be equal.");
148
* Test the shift() method.
150
testShift : function() {
153
var Assert = Y.Assert;
154
var ArrayAssert = Y.ArrayAssert;
156
//do whatever data manipulation is necessary
157
var value = this.data.shift();
159
//array shouldn't be empty
160
ArrayAssert.isNotEmpty(this.data, "Array should not be empty.");
162
//basic equality assertion - expected value, actual value, optional error message
163
Assert.areEqual(5, this.data.length, "Array should have 6 items.");
164
Assert.areEqual(0, value, "Value should be 0.");
166
ArrayAssert.itemsAreEqual([1,2,3,4,5], this.data, "Arrays should be equal.");
170
* Test the splice() method.
172
testSplice : function() {
175
var Assert = Y.Assert;
176
var ArrayAssert = Y.ArrayAssert;
178
//do whatever data manipulation is necessary
179
var removed = this.data.splice(1, 2, 99, 100);
181
//basic equality assertion - expected value, actual value, optional error message
182
Assert.areEqual(6, this.data.length, "Array should have 6 items.");
184
//the new items should be there
185
ArrayAssert.indexOf(99, this.data, 1, "Value at index 1 should be 99.");
186
ArrayAssert.indexOf(100, this.data, 2, "Value at index 2 should be 100.");
188
ArrayAssert.itemsAreEqual([0,99,100,3,4,5], this.data, "Arrays should be equal.");
189
ArrayAssert.itemsAreEqual([1,2], removed, "Removed values should be an array containing 1 and 2.");
194
* Test the unshift() method.
196
testUnshift : function() {
199
var Assert = Y.Assert;
200
var ArrayAssert = Y.ArrayAssert;
202
//do whatever data manipulation is necessary
203
this.data.unshift(-1);
205
//basic equality assertion - expected value, actual value, optional error message
206
Assert.areEqual(7, this.data.length, "Array should have 7 items.");
208
//the new item should be there
209
ArrayAssert.indexOf(-1, this.data, 0, "First item should be -1.");
211
ArrayAssert.itemsAreEqual([-1,0,1,2,3,4,5], this.data, "Arrays should be equal.");
217
var r = new Y.Console({
219
style: 'block' // to anchor in the example content
222
r.render('#testLogger');
224
Y.Test.Runner.add(Y.example.test.ArrayTestCase);
234
<h2 class="first" id="array-assertions">Array Assertions</h2>
236
<p>This example uses the <code>Y.ArrayAssert</code> object to test methods on JavaScript's
237
built-in <code>Array</code> object. The intent of this example is to introduce <code>Y.ArrayAssert</code> and its methods
238
as an alternative to the generic methods available on <code>Y.Assert</code>.</p>
239
<p>The example begins by creating an example namespace and <code>Y.Test.Case</code>:</p>
240
<pre class="code prettyprint">Y.namespace("example.test");
241
Y.example.test.ArrayTestCase = new Y.Test.Case({
243
name: "Array Tests",
245
//-------------------------------------------------------------------------
246
// Setup and teardown
247
//-------------------------------------------------------------------------
250
* The setUp() method is used to setup data that necessary for a test to
251
* run. This method is called immediately before each test method is run,
252
* so it is run as many times as there are test methods.
254
setUp : function () {
255
this.data = new Array (0,1,2,3,4,5);
259
* The tearDown() method is used to clean up the initialization that was done
260
* in the setUp() method. Ideally, it should free up all memory allocated in
261
* setUp(), anticipating any possible changes to the data. This method is called
262
* immediately after each test method is run.
264
tearDown : function () {
271
<p>This <code>TestCase</code> has a <code>setUp()</code> method that creates an array for all the tests to use, as well as
272
a <code>tearDown()</code> method that deletes the array after each test has been executed. This array is used throughout
273
the tests as a base for array manipulations.</p>
275
<h3 id="testing-push">Testing <code>push()</code></h3>
276
<p>The first test is <code>testPush()</code>, which tests the functionality of the <code>Array</code> object's <code>push()</code> method
277
(other methods hidden for simpicity):</p>
279
<pre class="code prettyprint">Y.example.test.ArrayTestCase = new Y.Test.Case({
283
testPush : function() {
285
//shortcut variables
286
var ArrayAssert = Y.ArrayAssert;
288
//do whatever data manipulation is necessary
291
//array-specific assertions
292
ArrayAssert.isNotEmpty(this.data, "Array should not be empty.");
293
ArrayAssert.contains(6, this.data, "Array should contain 6.");
294
ArrayAssert.indexOf(6, this.data, 6, "The value in position 6 should be 6.");
296
//check that all the values are there
297
ArrayAssert.itemsAreEqual([0,1,2,3,4,5,6], this.data, "Arrays should be equal.");
304
<p>The test begins by setting up a shortcut variables for <code>Y.ArrayAssert</code>, then pushes the value 6 onto
305
the <code>data</code> array (which was created by <code>setUp()</code>). Next, <code>Y.ArrayAssert.isNotEmpty()</code> determines if the
306
array has at least one item; this should definitely pass because the <code>push()</code> operation only adds values to the array. To determine
307
that the new value, 6, is in the array, <code>Y.ArrayAssert.contains()</code> is used. The first argument is the value to look for and the second
308
is the array to look in. To find out if the new value ended up where it should have (the last position, index 6), <code>Y.ArrayAssert.indexOf()</code>
309
is used, passing in the value to search for as the first argument, the array to search in as the second, and the index at which the value should
310
occur as the final argument. Since 6 was pushed onto the end of an array that already had 6 items, it should end up at index 6 (the length of the
311
array minus one). As a final test, <code>Y.ArrayAssert.itemsAreEqual()</code> is used to determine that all of the items in the array are in the
312
correct place. The first argument of this method is an array that has all of the values that should be in the array you're testing. This assertion
313
passes only when the values in both arrays match up (the values are equal and the positions are the same).</p>
315
<h3 id="testing-pop">Testing <code>pop()</code></h3>
316
<p>The next test is <code>testPop()</code>, which tests the functionality of the <code>Array</code> object's <code>pop()</code> method:</p>
318
<pre class="code prettyprint">Y.example.test.ArrayTestCase = new Y.Test.Case({
322
testPop : function() {
324
//shortcut variables
325
var Assert = Y.Assert;
326
var ArrayAssert = Y.ArrayAssert;
328
//do whatever data manipulation is necessary
329
var value = this.data.pop();
331
//array shouldn't be empty
332
ArrayAssert.isNotEmpty(this.data, "Array should not be empty.");
334
//basic equality assertion - expected value, actual value, optional error message
335
Assert.areEqual(5, this.data.length, "Array should have 5 items.");
336
Assert.areEqual(5, value, "Value should be 5.");
338
ArrayAssert.itemsAreSame([0,1,2,3,4], this.data, "Arrays should be equal.");
345
<p>This test also starts out by creating some shortcut variables, for <code>Y.Assert</code> and <code>Y.ArrayAssert</code>. Next, the <code>pop()</code>
346
method is called, storing the returned item in <code>value</code>. Since <code>pop()</code> should only remove a single item, <code>Y.ArrayAssert.isNotEmpty()</code>
347
is called to ensure that only one item has been removed. After that, <code>Y.Assert.areEqual()</code> is called twice: once to check the
348
length of the array and once to confirm the value of the item that was removed from the array (which should be 5). The last assertion uses
349
<code>Y.ArrayAssert.itemsAreSame()</code>, which is similar to <code>Y.ArrayAssert.itemsAreEqual()</code> in that it compares values between two
350
arrays. The difference is that <code>Y.ArrayAssert.itemsAreSame()</code> uses strict equality (<code>===</code>) to compare values, ensuring that
351
no behind-the-scenes type conversions will occur (this makes <code>Y.ArrayAssert.itemsAreSame()</code> more useful for working with arrays of
354
<h3 id="testing-reverse">Testing <code>reverse()</code></h3>
355
<p>The next test is <code>testReverse()</code>, which tests the functionality of the <code>Array</code> object's <code>reverse()</code> method:</p>
357
<pre class="code prettyprint">Y.example.test.ArrayTestCase = new Y.Test.Case({
361
testReverse : function() {
363
//shortcut variables
364
var ArrayAssert = Y.ArrayAssert;
366
//do whatever data manipulation is necessary
367
this.data = this.data.reverse();
369
ArrayAssert.itemsAreEqual([5,4,3,2,1,0], this.data, "Arrays should be equal.");
376
<p>The <code>testRemove()</code> method is very simple, calling <code>reverse()</code> on the array and then testing the result. Since
377
every item in the array has changed, the changes can be tested by calling <code>Y.ArrayAssert.itemsAreEqual()</code> once (instead of
378
calling <code>Y.ArrayAssert.indexOf()</code> multiple times). The first argument is an array with all the values in the reverse order
379
of the array that was created in <code>setUp()</code>. When compared with the second argument, the newly reversed array, the values in
380
each position should be equal.</p>
382
<h3 id="testing-shift">Testing <code>shift()</code></h3>
383
<p>The next test is <code>testShift()</code>, which tests the functionality of the <code>Array</code> object's <code>shift()</code> method:</p>
385
<pre class="code prettyprint">Y.example.test.ArrayTestCase = new Y.Test.Case({
389
testShift : function() {
391
//shortcut variables
392
var Assert = Y.Assert;
393
var ArrayAssert = Y.ArrayAssert;
395
//do whatever data manipulation is necessary
396
var value = this.data.shift();
398
//array shouldn't be empty
399
ArrayAssert.isNotEmpty(this.data, "Array should not be empty.");
401
//basic equality assertion - expected value, actual value, optional error message
402
Assert.areEqual(5, this.data.length, "Array should have 6 items.");
403
Assert.areEqual(0, value, "Value should be 0.");
405
ArrayAssert.itemsAreEqual([1,2,3,4,5], this.data, "Arrays should be equal.");
412
<p>The <code>shift()</code> method removes the first item in the array and returns it (similar to <code>pop()</code>, which removes the item
413
from the end). In the <code>testShift()</code> method, <code>shift()</code> is called and the item is stored in <code>value</code>. To ensure
414
that the rest of the array is still there, <code>Y.ArrayAssert.isNotEmpty()</code> is called. After that, <code>Array.areEqual()</code> is
415
called twice, once to test the length of the array and once to test the value that was returned from <code>shift()</code> (which should be
416
0). As a last test, the entire array is tested using <code>Y.ArrayAssert.itemsAreEqual()</code> to ensure that all of the items have shifted
417
into the appropriate positions in the array.</p>
419
<h3 id="testing-splice">Testing <code>splice()</code></h3>
420
<p>The next test is <code>testSplice()</code>, which tests the functionality of the <code>Array</code> object's <code>splice()</code> method:</p>
422
<pre class="code prettyprint">Y.example.test.ArrayTestCase = new Y.Test.Case({
426
testSplice : function() {
428
//shortcut variables
429
var Assert = Y.Assert;
430
var ArrayAssert = Y.ArrayAssert;
432
//do whatever data manipulation is necessary
433
var removed = this.data.splice(1, 2, 99, 100);
435
//basic equality assertion - expected value, actual value, optional error message
436
Assert.areEqual(6, this.data.length, "Array should have 6 items.");
438
//the new items should be there
439
ArrayAssert.indexOf(99, this.data, 1, "Value at index 1 should be 99.");
440
ArrayAssert.indexOf(100, this.data, 2, "Value at index 2 should be 100.");
442
ArrayAssert.itemsAreEqual([0,99,100,3,4,5], this.data, "Arrays should be equal.");
443
ArrayAssert.itemsAreEqual([1,2], removed, "Removed values should be an array containing 1 and 2.");
450
<p>The <code>splice()</code> method is one of the most powerful <code>Array</code> manipulations. It can both remove and add any number of items
451
from an array at the same time. This test begins by splicing some values into the array. When calling <code>splice()</code>, the first argument
452
is 1, indicating that values should be inserted at index 1 of the array; the second argument is 2, indicating that two values should be
453
removed from the array (the value in index 1 and the value in index 2); the third and fourth arguments are values that should be inserted
454
into the array at the position given by the first argument. Essentially, values 1 and 2 should end up being replaced by values 99 and 100 in
456
<p>The first test is to determine that the length of the array is still 6 (since the previous step removed two items and then inserted two, the
457
length should still be 6). After that, <code>Y.Assert.indexOf()</code> is called to determine that the values of 99 and 100 are in positions
458
1 and 2, respectively. To ensure the integrity of the entire array, <code>Y.ArrayAssert.itemsAreEqual()</code> is called on the array, comparing
459
it to an array with the same values. The very last step is to test the value returned from <code>splice()</code>, which is an array containing
460
the removed values, 1 and 2. <code>Y.ArrayAssert.itemsAreEqual()</code> is appropriate for this task as well.</p>
462
<h3 id="testing-unshift">Testing <code>unshift()</code></h3>
463
<p>The next test is <code>testUnshift()</code>, which tests the functionality of the <code>Array</code> object's <code>unshift()</code> method:</p>
465
<pre class="code prettyprint">Y.example.test.ArrayTestCase = new Y.Test.Case({
469
testUnshift : function() {
471
//shortcut variables
472
var Assert = Y.Assert;
473
var ArrayAssert = Y.ArrayAssert;
475
//do whatever data manipulation is necessary
476
this.data.unshift(-1);
478
//basic equality assertion - expected value, actual value, optional error message
479
Assert.areEqual(7, this.data.length, "Array should have 7 items.");
481
//the new item should be there
482
ArrayAssert.indexOf(-1, this.data, 0, "First item should be -1.");
484
ArrayAssert.itemsAreEqual([-1,0,1,2,3,4,5], this.data, "Arrays should be equal.");
491
<p>Working similar to <code>push()</code>, <code>unshift()</code> adds a value to the array, but the item is added to the front (index 0) instead of
492
the back. This test begins by adding the value -1 to the array. The first assertion determines if the length of the array has been incremented
493
to 7 to account for the new value. After that, <code>Y.ArrayAssert.indexOf()</code> is used to determine if the value has been placed in the
494
correct location. The final assertions tests that the entire array is expected by using <code>Y.ArrayAssert.itemsAreEqual()</code>.</p>
496
<h3 id="running-the-tests">Running the tests</h3>
498
<p>With all of the tests defined, the last step is to run them:</p>
500
<pre class="code prettyprint">//create the console
501
var r = new Y.Console({
506
r.render('#testLogger');
508
Y.Test.Runner.add(Y.example.test.ArrayTestCase);
510
//run the tests
511
Y.Test.Runner.run();</pre>
514
<p>Before running the tests, it's necessary to create a <code>Y.Console</code> object to display the results (otherwise the tests would run
515
but you wouldn't see the results). After that, the <code>Y.Test.Runner</code> is loaded with the <code>Y.Test.Case</code> object by calling
516
<code>add()</code> (any number of <code>Y.Test.Case</code> and <code>TestSuite</code> objects can be added to a <code>Y.Test.Runner</code>,
517
this example only adds one for simplicity). The very last step is to call <code>run()</code>, which begins executing the tests in its
518
queue and displays the results in the <code>Y.Console</code>.</p>
520
<h2 id="complete-example-source">Complete Example Source</h2>
522
<pre class="code prettyprint"><div id="testLogger"></div>
525
YUI().use('node', 'console', 'test', function (Y) {
527
Y.namespace("example.test");
529
Y.example.test.ArrayTestCase = new Y.Test.Case({
531
//the name of the test case - if not provided, one is automatically generated
532
name: "Array Tests",
534
//-------------------------------------------------------------------------
535
// Setup and teardown
536
//-------------------------------------------------------------------------
539
* The setUp() method is used to setup data that necessary for a test to
540
* run. This method is called immediately before each test method is run,
541
* so it is run as many times as there are test methods.
543
setUp : function () {
544
this.data = new Array (0,1,2,3,4,5);
548
* The tearDown() method is used to clean up the initialization that was done
549
* in the setUp() method. Ideally, it should free up all memory allocated in
550
* setUp(), anticipating any possible changes to the data. This method is called
551
* immediately after each test method is run.
553
tearDown : function () {
557
//-------------------------------------------------------------------------
558
// Basic tests - all method names must begin with "test"
559
//-------------------------------------------------------------------------
562
* Test the push() method.
564
testPush : function() {
566
//shortcut variables
567
var ArrayAssert = Y.ArrayAssert;
569
//do whatever data manipulation is necessary
572
//array-specific assertions
573
ArrayAssert.isNotEmpty(this.data, "Array should not be empty.");
574
ArrayAssert.contains(6, this.data, "Array should contain 6.");
575
ArrayAssert.indexOf(6, this.data, 6, "The value in position 6 should be 6.");
577
//check that all the values are there
578
ArrayAssert.itemsAreEqual([0,1,2,3,4,5,6], this.data, "Arrays should be equal.");
583
* Test the pop() method.
585
testPop : function() {
587
//shortcut variables
588
var Assert = Y.Assert;
589
var ArrayAssert = Y.ArrayAssert;
591
//do whatever data manipulation is necessary
592
var value = this.data.pop();
594
//array shouldn't be empty
595
ArrayAssert.isNotEmpty(this.data, "Array should not be empty.");
597
//basic equality assertion - expected value, actual value, optional error message
598
Assert.areEqual(5, this.data.length, "Array should have 5 items.");
599
Assert.areEqual(5, value, "Value should be 5.");
601
ArrayAssert.itemsAreSame([0,1,2,3,4], this.data, "Arrays should be equal.");
605
* Test the reverse() method.
607
testReverse : function() {
609
//shortcut variables
610
var ArrayAssert = Y.ArrayAssert;
612
//do whatever data manipulation is necessary
613
this.data = this.data.reverse();
615
ArrayAssert.itemsAreEqual([5,4,3,2,1,0], this.data, "Arrays should be equal.");
619
* Test the shift() method.
621
testShift : function() {
623
//shortcut variables
624
var Assert = Y.Assert;
625
var ArrayAssert = Y.ArrayAssert;
627
//do whatever data manipulation is necessary
628
var value = this.data.shift();
630
//array shouldn't be empty
631
ArrayAssert.isNotEmpty(this.data, "Array should not be empty.");
633
//basic equality assertion - expected value, actual value, optional error message
634
Assert.areEqual(5, this.data.length, "Array should have 6 items.");
635
Assert.areEqual(0, value, "Value should be 0.");
637
ArrayAssert.itemsAreEqual([1,2,3,4,5], this.data, "Arrays should be equal.");
641
* Test the splice() method.
643
testSplice : function() {
645
//shortcut variables
646
var Assert = Y.Assert;
647
var ArrayAssert = Y.ArrayAssert;
649
//do whatever data manipulation is necessary
650
var removed = this.data.splice(1, 2, 99, 100);
652
//basic equality assertion - expected value, actual value, optional error message
653
Assert.areEqual(6, this.data.length, "Array should have 6 items.");
655
//the new items should be there
656
ArrayAssert.indexOf(99, this.data, 1, "Value at index 1 should be 99.");
657
ArrayAssert.indexOf(100, this.data, 2, "Value at index 2 should be 100.");
659
ArrayAssert.itemsAreEqual([0,99,100,3,4,5], this.data, "Arrays should be equal.");
660
ArrayAssert.itemsAreEqual([1,2], removed, "Removed values should be an array containing 1 and 2.");
665
* Test the unshift() method.
667
testUnshift : function() {
669
//shortcut variables
670
var Assert = Y.Assert;
671
var ArrayAssert = Y.ArrayAssert;
673
//do whatever data manipulation is necessary
674
this.data.unshift(-1);
676
//basic equality assertion - expected value, actual value, optional error message
677
Assert.areEqual(7, this.data.length, "Array should have 7 items.");
679
//the new item should be there
680
ArrayAssert.indexOf(-1, this.data, 0, "First item should be -1.");
682
ArrayAssert.itemsAreEqual([-1,0,1,2,3,4,5], this.data, "Arrays should be equal.");
687
//create the console
688
var r = new Y.Console({
690
style: 'block' // to anchor in the example content
693
r.render('#testLogger');
695
Y.Test.Runner.add(Y.example.test.ArrayTestCase);
697
//run the tests
701
</script></pre>
706
<div id="sidebar" class="yui3-u">
708
<div id="toc" class="sidebox">
710
<h2 class="no-toc">Table of Contents</h2>
716
<a href="#array-assertions">Array Assertions</a>
719
<a href="#testing-push">Testing <code>push()</code></a>
722
<a href="#testing-pop">Testing <code>pop()</code></a>
725
<a href="#testing-reverse">Testing <code>reverse()</code></a>
728
<a href="#testing-shift">Testing <code>shift()</code></a>
731
<a href="#testing-splice">Testing <code>splice()</code></a>
734
<a href="#testing-unshift">Testing <code>unshift()</code></a>
737
<a href="#running-the-tests">Running the tests</a>
742
<a href="#complete-example-source">Complete Example Source</a>
750
<div class="sidebox">
752
<h2 class="no-toc">Examples</h2>
756
<ul class="examples">
759
<li data-description="Demonstrates basic usage of YUI Test for setting up and running tests.">
760
<a href="test-simple-example.html">Simple Testing Example</a>
765
<li data-description="Demonstrates how to use advanced testing features such as defining tests that should fail, tests that should be ignored, and tests that should throw an error.">
766
<a href="test-advanced-test-options.html">Advanced Test Options</a>
771
<li data-description="Demonstrates how to use the ArrayAssert object to test array data.">
772
<a href="test-array-tests.html">Array Processing</a>
777
<li data-description="Demonstrates basic asynchronous tests.">
778
<a href="test-async-test.html">Asynchronous Testing</a>
783
<li data-description="Demonstrates using events with asynchronous tests.">
784
<a href="test-async-event-tests.html">Asynchronous Event Testing</a>
798
<script src="../assets/vendor/prettify/prettify-min.js"></script>
799
<script>prettyPrint();</script>