node/test/addons/openssl-binding/test.js
Ben Noordhuis b4d4fd939c build: export openssl symbols on windows
Export symbols from the bundled openssl for add-ons to link against.

Fixes: https://github.com/nodejs/node-v0.x-archive/issues/4051
PR-URL: https://github.com/nodejs/node/pull/6274
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-07-05 16:09:58 +02:00

9 lines
241 B
JavaScript

'use strict';
require('../../common');
const assert = require('assert');
const binding = require('./build/Release/binding');
const bytes = new Uint8Array(1024);
assert(binding.randomBytes(bytes));
assert(bytes.reduce((v, a) => v + a) > 0);