mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 05:12:20 +00:00
chore: improve tsconfigs
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
import type { JestConfigWithTsJest } from 'ts-jest'
|
||||
|
||||
const jestConfig: JestConfigWithTsJest = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node'
|
||||
}
|
||||
|
||||
export default jestConfig
|
||||
@@ -14,24 +14,17 @@
|
||||
"build": "tsup --dts",
|
||||
"test": "pnpm test:unit",
|
||||
"test:watch": "pnpm test:unit:watch",
|
||||
"test:unit": "jest",
|
||||
"test:unit:watch": "jest --watch",
|
||||
"test:unit": "vitest",
|
||||
"test:unit:watch": "vitest --watch",
|
||||
"dev": "tsup --watch --dts",
|
||||
"lint": "eslint \"src/**/*.ts*\"",
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf src/proto"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bufbuild/buf": "^1.14.0",
|
||||
"@types/jest": "^29.5.1",
|
||||
"@zitadel/tsconfig": "workspace:*",
|
||||
"eslint": "^7.32.0",
|
||||
"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"
|
||||
"ts-proto": "^1.139.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { describe, expect, test, vitest } from "vitest";
|
||||
|
||||
import { CallOptions, ClientMiddlewareCall, Metadata, MethodDescriptor } from "nice-grpc-web";
|
||||
import { authMiddleware } from "./middleware";
|
||||
|
||||
@@ -24,9 +26,9 @@ describe('authMiddleware', () => {
|
||||
];
|
||||
|
||||
scenarios.forEach(({ name, initialMetadata, expectedMetadata, token }) => {
|
||||
it(name, async () => {
|
||||
test(name, async () => {
|
||||
|
||||
const mockNext = jest.fn().mockImplementation(async function*() { });
|
||||
const mockNext = vitest.fn().mockImplementation(async function*() { });
|
||||
const mockRequest = {};
|
||||
|
||||
const mockMethodDescriptor: MethodDescriptor = {
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
{
|
||||
"extends": "@zitadel/tsconfig/node14.json",
|
||||
"include": ["."],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "."
|
||||
},
|
||||
"extends": "@zitadel/tsconfig/tsup.json",
|
||||
"include": ["./src/**/*"],
|
||||
"exclude": ["dist", "build", "node_modules"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user