Skip to content

Commit 09cef52

Browse files
committed
Revert "Reorder the tests"
This reverts commit 8e0b160.
1 parent 8e0b160 commit 09cef52

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

test/tests_async.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ casper.test.begin("Testing example_async.html", 108, function(test) {
5353
tests.push(function (message){
5454
test.assertEquals(message[0], 'Sending XML HTTP request');
5555
});
56+
tests.push(function (message){
57+
test.assertEquals(message[0], 'Request Finished');
58+
var params = JSON.parse(message[1]);
59+
test.assertEquals(params.begin_session, 1);
60+
test.assertEquals(params.app_key, "YOUR_APP_KEY");
61+
test.assert(exists(params.device_id));
62+
test.assert(exists(params.timestamp));
63+
test.assert(exists(params.hour));
64+
test.assert(exists(params.dow));
65+
params.metrics = JSON.parse(params.metrics);
66+
test.assertEquals(params.metrics._app_version, '0.0');
67+
test.assertEquals(params.metrics._resolution, '1024x768');
68+
test.assertEquals(params.metrics._locale, 'en-US');
69+
});
5670
tests.push(function (message){
5771
test.assertEquals(message[0], 'Processing queued call');
5872
var params = JSON.parse(message[1])
@@ -69,20 +83,6 @@ casper.test.begin("Testing example_async.html", 108, function(test) {
6983
test.assertEquals(params.segmentation.id, "testButton");
7084
test.assertEquals(params.count, 1);
7185
});
72-
tests.push(function (message){
73-
test.assertEquals(message[0], 'Request Finished');
74-
var params = JSON.parse(message[1]);
75-
test.assertEquals(params.begin_session, 1);
76-
test.assertEquals(params.app_key, "YOUR_APP_KEY");
77-
test.assert(exists(params.device_id));
78-
test.assert(exists(params.timestamp));
79-
test.assert(exists(params.hour));
80-
test.assert(exists(params.dow));
81-
params.metrics = JSON.parse(params.metrics);
82-
test.assertEquals(params.metrics._app_version, '0.0');
83-
test.assertEquals(params.metrics._resolution, '1024x768');
84-
test.assertEquals(params.metrics._locale, 'en-US');
85-
});
8686
tests.push(function (message){
8787
test.assertEquals(message[0], 'Processing request');
8888
var params = JSON.parse(message[1]);

0 commit comments

Comments
 (0)