From 35d936036f423c73dbca514b642c5f4e24c07f80 Mon Sep 17 00:00:00 2001 From: Nairi Harutyunyan Date: Tue, 10 Oct 2023 21:23:10 +0300 Subject: [PATCH] Improve a test case --- README.md | 2 +- test/funthreads.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e1efa4e..1afd6ae 100644 --- a/README.md +++ b/README.md @@ -120,4 +120,4 @@ read(); The `ThreadModules` class lets you set up modules for the thread. You can provide it only thorough the second argument, and you'll have access to the libraries through the `modules` object. -You should only provide the `ThreadModules` type of object once through the second parameter. Attempting to provide it multiple times will result in an error. Additionally, avoid returning the `modules` object from the task function, as it will also lead to errors. \ No newline at end of file +You should only provide the `ThreadModules` type of object once through the second parameter. Attempting to provide it multiple times will result in an error. Additionally, avoid returning the `modules` object from the task function, as it will also lead to errors. diff --git a/test/funthreads.test.js b/test/funthreads.test.js index 2a77c59..bd363b2 100644 --- a/test/funthreads.test.js +++ b/test/funthreads.test.js @@ -25,7 +25,7 @@ test('Should get access to modules', async () => { const param1 = 100; const param2 = 14; - const num = await executeInThread((p1, p2, modules) => { + const num = await executeInThread((modules, p1, p2) => { if (modules['assert'] && modules['fs']) { return p1 ** p2; }