migrated casper/agent tests to new testing format
Showing
1 changed file
with
7 additions
and
10 deletions
... | @@ -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 | }); | ... | ... |
-
Please register or sign in to post a comment