Skip to content

Commit

Permalink
Merge pull request #18 from nairihar/dev
Browse files Browse the repository at this point in the history
Minor change & Improve a test case
  • Loading branch information
nairihar committed Oct 10, 2023
2 parents 47397f3 + 35d9360 commit 947a12d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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.
2 changes: 1 addition & 1 deletion test/funthreads.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 947a12d

Please sign in to comment.