Permalink
Browse files

test `this` in tests

  • Loading branch information...
1 parent 673fa6a commit 1bc10ad97d1461e97a9fbd4b088c4152ebc35dc7 @kkaefer kkaefer committed Sep 22, 2011
Showing with 20 additions and 0 deletions.
  1. +20 −0 test/this.test.js
View
@@ -0,0 +1,20 @@
+/**
+ * This.
+ */
+
+module.exports = {
+ 'test this': function(beforeExit, assert) {
+ assert.equal(this.suite, 'this.test.js');
+ assert.equal(this.title, 'test this');
+ assert.ok(this.assert);
+
+ var exiting = false;
+ this.on('exit', function() {
+ exiting = true;
+ });
+
+ beforeExit(function() {
+ assert.ok(exiting);
+ })
+ }
+};

0 comments on commit 1bc10ad

Please sign in to comment.