chore: adds tests

This commit is contained in:
2026-04-23 23:36:32 -03:00
parent dda6942228
commit a60e686407
7 changed files with 4833 additions and 10 deletions

View File

@@ -6,19 +6,23 @@
"build": "node esbuild.config.mjs",
"push": "npm run build && ts-node publish.ts",
"format": "prettier --check --ignore-path .gitignore .",
"format:fix": "prettier --write --ignore-path .gitignore ."
"format:fix": "prettier --write --ignore-path .gitignore .",
"test": "jest"
},
"dependencies": {
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
"@types/screeps": "^3.3.8",
"dotenv": "^17.4.2",
"esbuild": "^0.28.0",
"jest": "^30.3.0",
"prettier": "^3.8.3",
"ts-jest": "^29.4.9",
"ts-node": "^10.9.2",
"typescript": "^6.0.3",
"zod": "^4.3.6"
},
"devDependencies": {
"@types/jest": "^30.0.0",
"@types/node": "^25.6.0"
},
"prettier": {
@@ -36,5 +40,24 @@
"jsx",
"decorators-legacy"
]
},
"jest": {
"testEnvironment": "node",
"transform": {
"^.+\\.(ts|tsx)$": "ts-jest"
},
"moduleNameMapper": {
"\\.(png|jpg|jpeg|gif|webp|svg|ico)$": "<rootDir>/tests/setup/__mocks__/fileMock.js",
"^@/(.*)$": "<rootDir>/src/$1",
"^~/(.*)$": "<rootDir>/$1"
},
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"testMatch": [
"**/?(*.)+(spec|test).[jt]s?(x)"
]
}
}