diff --git a/tests/blake2worker.js b/tests/blake2worker.js index 5b58bb1..fe60b87 100644 --- a/tests/blake2worker.js +++ b/tests/blake2worker.js @@ -12,13 +12,13 @@ function newWorker (data) { workerData: { data: data }, - }); - worker.on('message', (hash) => { + }); + worker.on('message', (hash) => { resolve(hash); - }); - worker.on('error', (msg) => { + }); + worker.on('error', (msg) => { reject(msg); - }); + }); }); } diff --git a/tests/worker/blake2hash-worker.js b/tests/worker/blake2hash-worker.js index 99bf108..3dfbbc8 100644 --- a/tests/worker/blake2hash-worker.js +++ b/tests/worker/blake2hash-worker.js @@ -1,7 +1,8 @@ 'use strict'; + const blake2 = require('../../index.js'); const {workerData, parentPort} = require('worker_threads'); -const blake2Hash = (data) => { +const blake2Hash = data => { const context = blake2.createHash('blake2b'); context.update(Buffer.from(data)); const hash = context.digest('hex');