Skip to content

Commit

Permalink
Configure setup files and worker threads in Jest to fix some of the B…
Browse files Browse the repository at this point in the history
…igInt issues
  • Loading branch information
lemilonkh committed Mar 22, 2024
1 parent ed9d225 commit 4160bcc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ const config: JestConfigWithTsJest = {
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
},
setupFiles: ["<rootDir>/jest.setup.ts"],

// enable worker threads feature to fix BigInt serialization issue
workerThreads: true,

// All imported modules in your tests should be mocked automatically
// automock: false,
Expand Down
1 change: 1 addition & 0 deletions app/jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "@/util/big_int_json.ts";

0 comments on commit 4160bcc

Please sign in to comment.