Add pre commits
This commit is contained in:
parent
1b5c56ca9b
commit
7d6ade4142
6 changed files with 24 additions and 6 deletions
15
.pre-commit-config.yaml
Normal file
15
.pre-commit-config.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: test-ui
|
||||
name: Test Frontend
|
||||
entry: just test-frontend
|
||||
language: python
|
||||
pass_filenames: false
|
||||
files: \.ts*
|
||||
- id: typecheck
|
||||
name: Typecheck Frontend
|
||||
entry: just typecheck
|
||||
language: python
|
||||
pass_filenames: false
|
||||
files: \.ts*
|
||||
|
|
@ -1 +0,0 @@
|
|||
3.13
|
||||
6
justfile
6
justfile
|
|
@ -1,5 +1,11 @@
|
|||
_frontend-dev:
|
||||
cd ui && pnpm run dev
|
||||
|
||||
test-frontend:
|
||||
cd ui && pnpm run test
|
||||
|
||||
typecheck:
|
||||
cd ui && tsc -b
|
||||
|
||||
_backend-dev:
|
||||
air -- -dev
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
"build": "tsc -b && vite build",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview",
|
||||
"test": "vitest",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
import { screen, waitFor } from "@testing-library/react";
|
||||
import { PublicRoute } from "@ui/components/PublicRoute";
|
||||
import { Routes, Route } from "react-router-dom";
|
||||
import {
|
||||
SessionProvider,
|
||||
SessionTestProvider,
|
||||
} from "@ui/contexts/SessionContext";
|
||||
import { SessionTestProvider } from "@ui/contexts/SessionContext";
|
||||
import { renderWithRouter } from "@ui/utils/testHelpers";
|
||||
|
||||
describe("PublicRoute", () => {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export const PublicRoute = () => {
|
|||
} else {
|
||||
status = "should-pass";
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{match(status)
|
||||
|
|
|
|||
Loading…
Reference in a new issue