Skip to content

Commit

Permalink
Improved formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
vrza committed Feb 24, 2023
1 parent 67a4522 commit ec6302c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/blake2worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});
}

Expand Down
3 changes: 2 additions & 1 deletion tests/worker/blake2hash-worker.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down

0 comments on commit ec6302c

Please sign in to comment.