test: Update assert module tests
authorMaciej Małecki <maciej.malecki@notimplemented.org>
Sat, 1 Oct 2011 11:52:24 +0000 (13:52 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Sun, 2 Oct 2011 00:25:52 +0000 (02:25 +0200)
test/simple/test-assert.js

index f0e78b8..3bd1715 100644 (file)
@@ -33,6 +33,12 @@ function makeBlock(f) {
 assert.ok(common.indirectInstanceOf(a.AssertionError.prototype, Error),
           'a.AssertionError instanceof Error');
 
+assert.throws(makeBlock(a, false), a.AssertionError, 'ok(false)');
+
+assert.doesNotThrow(makeBlock(a, true), a.AssertionError, 'ok(true)');
+
+assert.doesNotThrow(makeBlock(a, 'test', 'ok(\'test\')'));
+
 assert.throws(makeBlock(a.ok, false),
               a.AssertionError, 'ok(false)');