repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: add queue tests
[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 177ef08bbe648a207cf74076ce6078dfac20c28a..668587dbf0bb85925640d9d90e90f991efde7cbf 100644
(file)
--- a/
tests/worker-files/thread/testWorker.js
+++ b/
tests/worker-files/thread/testWorker.js
@@
-7,8
+7,11
@@
const { WorkerFunctions } = require('../../test-types')
function test (data) {
data = data || {}
data.function = data.function || WorkerFunctions.jsonIntegerSerialization
function test (data) {
data = data || {}
data.function = data.function || WorkerFunctions.jsonIntegerSerialization
- TestUtils.executeWorkerFunction(data)
- return isMainThread
+ const result = TestUtils.executeWorkerFunction(data)
+ if (result == null) {
+ return isMainThread
+ }
+ return result
}
module.exports = new ThreadWorker(test, {
}
module.exports = new ThreadWorker(test, {