Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
test: Update assert module tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki authored and bnoordhuis committed Oct 2, 2011
1 parent f4f037a commit 365fdbf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/simple/test-assert.js
Expand Up @@ -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)');

Expand Down

0 comments on commit 365fdbf

Please sign in to comment.