Commit 5a351ad3 5a351ad3652c50e90e36f70287193acf631a0b3d by Nicolas Perriault

migrated casper/agent tests to new testing format

1 parent 08625bd0
...@@ -12,15 +12,12 @@ function fetchUA(request) { ...@@ -12,15 +12,12 @@ function fetchUA(request) {
12 }).pop().value, /plop/); 12 }).pop().value, /plop/);
13 } 13 }
14 14
15 testUA(casper.options.pageSettings.userAgent, /CasperJS/); 15 casper.test.begin('userAgent() tests', 3, function(test) {
16 16 testUA(casper.options.pageSettings.userAgent, /CasperJS/);
17 casper.start(); 17 casper.start();
18 18 casper.userAgent('plop').on('resource.requested', fetchUA);
19 casper.userAgent('plop').on('resource.requested', fetchUA); 19 casper.thenOpen('tests/site/index.html').run(function() {
20
21 casper.thenOpen('tests/site/index.html');
22
23 casper.run(function() {
24 this.removeListener('resource.requested', fetchUA); 20 this.removeListener('resource.requested', fetchUA);
25 this.test.done(3); 21 test.done();
22 });
26 }); 23 });
......