koffi
Version:
Fast and simple C FFI (foreign function interface) for Node.js
14 lines (10 loc) • 346 B
JavaScript
const assert = require('assert');
module.exports = require('../common').runTest(test);
async function test (binding) {
const ctx = { };
const tsfn = new binding.threadsafe_function_ctx.TSFNWrap(ctx);
assert(tsfn.getContext() === ctx);
await tsfn.release();
binding.threadsafe_function_ctx.AssertFnReturnCorrectCxt();
}
;