From c3e5fa9af7e0f5b99ccde19df5be6fefcea41b04 Mon Sep 17 00:00:00 2001 From: Narendranath Gogineni Date: Fri, 2 Aug 2024 17:19:14 +0530 Subject: [PATCH] Add Jest --- jest.config.js | 8 ++++++++ package.json | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 jest.config.js diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 00000000..f2230714 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,8 @@ +/** @type {import('ts-jest').JestConfigWithTsJest} **/ +export default { + testEnvironment: 'node', + transform: { + '^.+.tsx?$': ['ts-jest', {}], + }, + testTimeout: 30000, // Set default timeout to 30 seconds +}; diff --git a/package.json b/package.json index db5ec239..5423488d 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "start:node": "node build/start-server.js", "format": "prettier --write \"./**/*.{js,jsx,ts,tsx,json}\"", "format:check": "prettier --check \"./**/*.{js,jsx,ts,tsx,json}\"", - "test": "ts-jest" + "test": "jest" }, "dependencies": { "@aws-crypto/sha256-js": "^5.2.0", @@ -57,7 +57,7 @@ "jest": "^29.7.0", "prettier": "3.2.5", "rollup": "^4.9.1", - "ts-jest": "^29.1.2", + "ts-jest": "^29.2.4", "tsx": "^4.7.0", "typescript-eslint": "^8.1.0", "wrangler": "^3.48.0"