X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fthread%2FtestWorker.js;h=f843329f296b17ae295eb3c58beeeb284b3e3b71;hb=73cda44834b69b6120f256d40351a504fb86c1ae;hp=773e11164014a35a01e3cfc0dfe3f8f797d46336;hpb=bf9549aef8a23a3931e19040dadb7f1e8e6422b5;p=poolifier.git diff --git a/tests/worker-files/thread/testWorker.js b/tests/worker-files/thread/testWorker.js index 773e1116..f843329f 100644 --- a/tests/worker-files/thread/testWorker.js +++ b/tests/worker-files/thread/testWorker.js @@ -2,9 +2,12 @@ const { ThreadWorker, KillBehaviors } = require('../../../lib/index') const { isMainThread } = require('worker_threads') const TestUtils = require('../../test-utils') +const { WorkerFunctions } = require('../../test-types') function test (data) { - TestUtils.jsonIntegerSerialization(100) + data = data || {} + data.function = data.function || WorkerFunctions.jsonIntegerSerialization + TestUtils.executeWorkerFunction(data) return isMainThread }