Permalink
Browse files

added isFalse

  • Loading branch information...
1 parent d50e017 commit 05eb5e246ed416b1c92ff201a55cc30c55b5eefd Alex Young committed Oct 24, 2009
Showing with 9 additions and 0 deletions.
  1. +8 −0 riot.js
  2. +1 −0 test.js
View
@@ -394,6 +394,14 @@ Riot.Assertion.prototype = {
});
},
+ isFalse: function() {
+ this.setAssertion(function(actual) {
+ if (actual() !== false) {
+ this.fail(actual() + ' was not false');
+ }
+ });
+ },
+
isNull: function() {
this.setAssertion(function(actual) {
if (actual() !== null) {
View
@@ -10,6 +10,7 @@ Riot.run(function() {
});
asserts('a simple truth test should return true', true).isTrue();
+ asserts('a false test returns false', false).isFalse();
asserts('isNull is null', null).isNull();
asserts('no chained test expected a value', true);
});

0 comments on commit 05eb5e2

Please sign in to comment.