diff --git a/app/jest.config.ts b/app/jest.config.ts index eb281a6a0..60a0f28fc 100644 --- a/app/jest.config.ts +++ b/app/jest.config.ts @@ -23,6 +23,10 @@ const config: JestConfigWithTsJest = { moduleNameMapper: { "^@/(.*)$": "/src/$1", }, + setupFiles: ["/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, diff --git a/app/jest.setup.ts b/app/jest.setup.ts new file mode 100644 index 000000000..e16be11be --- /dev/null +++ b/app/jest.setup.ts @@ -0,0 +1 @@ +import "@/util/big_int_json.ts";