mirror of
https://github.com/nodejs/node.git
synced 2024-11-28 22:46:31 +01:00
0e19476595
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/iojs/io.js/pull/172 Fix: iojs/io.js#139
17 lines
287 B
JavaScript
17 lines
287 B
JavaScript
var assert = require('assert');
|
|
|
|
assert.throws(
|
|
function() {
|
|
process.binding('test');
|
|
},
|
|
/No such module: test/
|
|
);
|
|
|
|
assert.doesNotThrow(function () {
|
|
process.binding('buffer');
|
|
}, function(err) {
|
|
if ( (err instanceof Error) ) {
|
|
return true;
|
|
}
|
|
}, "unexpected error");
|