0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-process-binding.js

18 lines
300 B
JavaScript
Raw Normal View History

'use strict';
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');