summaryrefslogtreecommitdiff
path: root/test/parallel/test-process-binding.js
blob: 475891aa5d30d812d47578b915567597fbc29601 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict';
require('../common');
const 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');