From a13b36c96ef2f60a5646676e2d6680301d9ff3e6 Mon Sep 17 00:00:00 2001 From: NickNaso Date: Fri, 4 Sep 2020 01:21:35 +0200 Subject: [PATCH] test: fix the threasfafe function test test: fixed the execution for the threasfafe function test PR-URL: https://github.com/nodejs/node-addon-api/pull/807 Fixes: https://github.com/nodejs/node-addon-api/issues/806 Reviewed-By: Michael Dawson -sh-4.2$ --- test/threadsafe_function/threadsafe_function.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/threadsafe_function/threadsafe_function.js b/test/threadsafe_function/threadsafe_function.js index 4c4bbf8a3..419c214f8 100644 --- a/test/threadsafe_function/threadsafe_function.js +++ b/test/threadsafe_function/threadsafe_function.js @@ -4,10 +4,10 @@ const buildType = process.config.target_defaults.default_configuration; const assert = require('assert'); const common = require('../common'); -module.exports = async function() { +module.exports = (async function() { await test(require(`../build/${buildType}/binding.node`)); await test(require(`../build/${buildType}/binding_noexcept.node`)); -}; +})(); async function test(binding) { const expectedArray = (function(arrayLength) {