Skip to content

Commit

Permalink
fix test configs
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyrushton committed Sep 24, 2024
1 parent b3cf72f commit ba63e42
Show file tree
Hide file tree
Showing 8 changed files with 979 additions and 3,158 deletions.
12 changes: 11 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
"allowExpressions": true
}
],
"import/no-unresolved": [
"error", {
"ignore": [
"geist"
]
}
],
"no-plusplus": "off",
"no-nested-ternary": "off",
"react/require-default-props": "off",
Expand Down Expand Up @@ -87,7 +94,10 @@
},
"settings": {
"import/resolver": {
"typescript": {}
"typescript": {
"alwaysTryTypes": true,
"paths": "./tsconfig.json"
}
}
},
"globals" : {
Expand Down
8 changes: 3 additions & 5 deletions __tests__/server/routers/getSeasonAverage.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { describe, it, expect } from 'vitest'
import { serverClient } from '@/app/_trpc/serverClient'
import { faker } from '@faker-js/faker'
import { getCurrentSeason } from '@/lib/getCurrentSeason'
import { prismaMock } from '../../singleton'
import { generateSeasonAverage } from '../../helpers/generators'
import { getCurrentSeason } from '@/lib/getCurrentSeason'

const mockSeasonAverage = {
...generateSeasonAverage(),
Expand All @@ -23,12 +23,10 @@ describe('api/getSeasonAverage', () => {

const { seasonAverage } = await serverClient.getSeasonAverage({ id })

expect(
prismaMock.seasonAverages.findUnique
).toHaveBeenCalledWith({
expect(prismaMock.seasonAverages.findUnique).toHaveBeenCalledWith({
where: {
player_id: id,
season: getCurrentSeason(),
season: getCurrentSeason(),
},
})

Expand Down
107 changes: 54 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,73 +14,74 @@
"seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} -r tsconfig-paths/register prisma/seed.ts"
},
"dependencies": {
"@neondatabase/serverless": "^0.9.0",
"@prisma/adapter-neon": "^5.11.0",
"@prisma/client": "^5.6.0",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-tabs": "^1.0.4",
"@tanstack/react-query": "^4.18.0",
"@trpc/client": "^10.45.0",
"@trpc/react-query": "^10.45.0",
"@trpc/server": "^10.45.0",
"@types/jsdom": "^21.1.6",
"@vercel/analytics": "^1.1.4",
"@vercel/speed-insights": "^1.0.10",
"@neondatabase/serverless": "^0.9.5",
"@prisma/adapter-neon": "^5.19.1",
"@prisma/client": "^5.19.1",
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-tabs": "^1.1.0",
"@tanstack/react-query": "^5.56.2",
"@trpc/client": "^10.45.2",
"@trpc/react-query": "^10.45.2",
"@trpc/server": "^10.45.2",
"@types/jsdom": "^21.1.7",
"@vercel/analytics": "^1.3.1",
"@vercel/speed-insights": "^1.0.12",
"bufferutil": "^4.0.8",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"dayjs": "^1.11.10",
"geist": "^1.2.1",
"jsdom": "^24.0.0",
"clsx": "^2.1.1",
"dayjs": "^1.11.13",
"geist": "^1.3.1",
"jsdom": "^25.0.1",
"lucide-react": "^0.445.0",
"next": "^14.2.13",
"react": "^18",
"react-dom": "^18",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"server-only": "^0.0.1",
"sharp": "^0.33.2",
"tailwind-merge": "^2.2.1",
"sharp": "^0.33.5",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7",
"ws": "^8.16.0",
"zod": "^3.22.4"
"vite-tsconfig-paths": "^5.0.1",
"ws": "^8.18.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@faker-js/faker": "^9.0.0",
"@serverless/typescript": "^3.30.1",
"@types/aws-lambda": "^8.10.119",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"autoprefixer": "^10.4.17",
"@faker-js/faker": "^9.0.2",
"@serverless/typescript": "^3.38.0",
"@types/aws-lambda": "^8.10.145",
"@types/node": "^22.6.1",
"@types/react": "^18.3.9",
"@types/react-dom": "^18.3.0",
"@types/ws": "^8.5.12",
"@typescript-eslint/eslint-plugin": "^8.7.0",
"autoprefixer": "^10.4.20",
"esbuild": "^0.24.0",
"eslint": "^8.57.0",
"eslint": "^9.11.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-google": "^0.14.0",
"eslint-config-next": "14.2.13",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.34.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-security": "^3.0.0",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-sonarjs": "^2.0.0",
"glob": "^10.4.5",
"postcss": "^8.4.33",
"prettier": "^3.0.3",
"prisma": "^5.6.0",
"serverless": "^3.38.0",
"serverless-esbuild": "^1.46.0",
"serverless-offline": "^13.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.36.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-security": "^3.0.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sonarjs": "^2.0.2",
"glob": "^11.0.0",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"prisma": "^5.19.1",
"serverless": "^4.4.0",
"serverless-esbuild": "^1.53.0",
"serverless-offline": "^14.3.2",
"serverless-ssm-fetch": "^2.0.0",
"tailwindcss": "^3.4.1",
"tailwindcss": "^3.4.13",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5",
"vite-tsconfig-paths": "^5.0.0",
"vitest": "^1.5.0",
"vitest-mock-extended": "^1.3.1"
"typescript": "^5.6.2",
"vitest": "^2.1.1",
"vitest-mock-extended": "^2.0.2"
}
}
Loading

0 comments on commit ba63e42

Please sign in to comment.