test: run unit and integration tests

This commit is contained in:
Elio Bischof
2023-05-25 17:11:36 +02:00
parent 5d36a54849
commit f40f7fde76
15 changed files with 272 additions and 54 deletions

View File

@@ -0,0 +1,8 @@
import type { JestConfigWithTsJest } from 'ts-jest'
const jestConfig: JestConfigWithTsJest = {
preset: 'ts-jest',
testEnvironment: 'node'
}
export default jestConfig

View File

@@ -11,12 +11,14 @@
"dist/**"
],
"scripts": {
"generate": "buf generate https://github.com/zitadel/zitadel.git --path ./proto/zitadel",
"prebuild": "pnpm run generate",
"build": "tsup --dts",
"test": "jest",
"test:watch": "jest --watch",
"dev": "tsup --dts --watch",
"lint": "eslint \"src/**/*.ts*\"",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"prebuild": "pnpm run generate",
"generate": "buf generate https://github.com/zitadel/zitadel.git --path ./proto/zitadel"
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},
"devDependencies": {
"@bufbuild/buf": "^1.14.0",
@@ -26,6 +28,7 @@
"eslint-config-zitadel": "workspace:*",
"jest": "^29.5.0",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"ts-proto": "^1.139.0",
"tsup": "^5.10.1",
"typescript": "^4.9.3"
@@ -40,4 +43,4 @@
"nice-grpc-common": "^2.0.2",
"protobufjs": "^7.2.3"
}
}
}