Skip to content

Commit 8e0b160

Browse files
committed
Reorder the tests
1 parent f462168 commit 8e0b160

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,20 +53,6 @@ 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-
});
7056
tests.push(function (message){
7157
test.assertEquals(message[0], 'Processing queued call');
7258
var params = JSON.parse(message[1])
@@ -83,6 +69,20 @@ casper.test.begin("Testing example_async.html", 108, function(test) {
8369
test.assertEquals(params.segmentation.id, "testButton");
8470
test.assertEquals(params.count, 1);
8571
});
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)