From 365fdbfc643ddd5b04bd704aab585c46a58598cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Ma=C5=82ecki?= Date: Sat, 1 Oct 2011 13:52:24 +0200 Subject: [PATCH] test: Update assert module tests --- test/simple/test-assert.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/simple/test-assert.js b/test/simple/test-assert.js index f0e78b85f6a..3bd17159709 100644 --- a/test/simple/test-assert.js +++ b/test/simple/test-assert.js @@ -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)');