projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4f037a
)
test: Update assert module tests
author
Maciej Małecki
<maciej.malecki@notimplemented.org>
Sat, 1 Oct 2011 11:52:24 +0000
(13:52 +0200)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Sun, 2 Oct 2011 00:25:52 +0000
(
02:25
+0200)
test/simple/test-assert.js
patch
|
blob
|
history
diff --git
a/test/simple/test-assert.js
b/test/simple/test-assert.js
index
f0e78b8
..
3bd1715
100644
(file)
--- 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)');