chore: add changelog entry
[poolifier.git] / tests / worker-files / thread / testWorker.js
index 773e11164014a35a01e3cfc0dfe3f8f797d46336..f843329f296b17ae295eb3c58beeeb284b3e3b71 100644 (file)
@@ -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
 }