test: add test case for process.dlopen with undefined

PR-URL: https://github.com/nodejs/node/pull/17343
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
This commit is contained in:
Leko
2017-11-30 21:27:47 +09:00
committed by Anna Henningsen
parent 4b30287966
commit 2355c843ba

View File

@@ -0,0 +1,10 @@
'use strict';
require('../common');
const assert = require('assert');
const someBindingPath = './test/addons/hello-world/build/Release/binding.node';
assert.throws(() => {
process.dlopen({ exports: undefined }, someBindingPath);
}, Error);