chore: test suite

This commit is contained in:
hypercross 2026-03-15 11:44:23 +08:00
parent 0ec129c2be
commit 92dac64326
3 changed files with 5645 additions and 3 deletions

22
jest.config.js Normal file
View File

@ -0,0 +1,22 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: {
target: 'ES2020',
module: 'ESNext',
moduleResolution: 'node',
esModuleInterop: true,
strict: true,
skipLibCheck: true
}
}
]
}
};

5619
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,8 @@
"preview": "rsbuild preview",
"cli:dev": "tsc -p tsconfig.cli.json --watch",
"cli:build": "tsc -p tsconfig.cli.json",
"ttrpg": "node --loader ts-node/esm ./src/cli/index.ts"
"ttrpg": "node --loader ts-node/esm ./src/cli/index.ts",
"test": "jest"
},
"keywords": [
"ttrpg",
@ -50,9 +51,13 @@
"@tailwindcss/postcss": "^4.2.1",
"@tailwindcss/typography": "^0.5.15",
"@tailwindcss/vite": "^4.0.0",
"@types/jest": "^30.0.0",
"@types/js-yaml": "^4.0.9",
"@types/node": "^22.19.13",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"tailwindcss": "^4.0.0",
"ts-jest": "^29.4.6",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
}