repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: cleanup internal benchmark code
[poolifier.git]
/
tests
/
worker-files
/
thread
/
testWorker.js
diff --git
a/tests/worker-files/thread/testWorker.js
b/tests/worker-files/thread/testWorker.js
index ccf55b56ba92d29e3848ecf0d19d37fe39f068e9..2b86fde282c6ed28106656164d7af1275b479b00 100644
(file)
--- a/
tests/worker-files/thread/testWorker.js
+++ b/
tests/worker-files/thread/testWorker.js
@@
-1,10
+1,13
@@
'use strict'
'use strict'
-const { ThreadWorker, KillBehaviors } = require('../../../lib
/index
')
+const { ThreadWorker, KillBehaviors } = require('../../../lib')
const { isMainThread } = require('worker_threads')
const TestUtils = require('../../test-utils')
const { isMainThread } = require('worker_threads')
const TestUtils = require('../../test-utils')
+const { WorkerFunctions } = require('../../test-types')
function test (data) {
function test (data) {
- TestUtils.jsonIntegerSerialization(50)
+ data = data || {}
+ data.function = data.function || WorkerFunctions.jsonIntegerSerialization
+ TestUtils.executeWorkerFunction(data)
return isMainThread
}
return isMainThread
}