Permalink
Browse files

migrated casper/alert tests to new testing format

  • Loading branch information...
1 parent 5a351ad commit c127d19eb3db21d4c979c767cfde7fc395d266dd @n1k0 n1k0 committed Dec 28, 2012
Showing with 10 additions and 11 deletions.
  1. +10 −11 tests/suites/casper/alert.js
@@ -1,14 +1,13 @@
/*global casper*/
/*jshint strict:false*/
-
-var ok = false;
-
-casper.on('remote.alert', function(message) {
- ok = message === 'plop';
-});
-
-casper.start('tests/site/alert.html').run(function() {
- this.test.assert(ok, 'alert event has been intercepted');
- this.removeAllListeners('remote.alert');
- this.test.done(1);
+casper.test.begin('alert events', 1, function(test) {
+ var ok = false;
+ casper.on('remote.alert', function(message) {
+ ok = message === 'plop';
+ });
+ casper.start('tests/site/alert.html').run(function() {
+ this.test.assert(ok, 'alert event has been intercepted');
+ this.removeAllListeners('remote.alert');
+ test.done();
+ });
});

0 comments on commit c127d19

Please sign in to comment.