Skip to content

Commit 563457f

Browse files
committed
disable VITE_DEV_BYPASS_AUTH in test
1 parent 937cc32 commit 563457f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"build": "tsc && NODE_ENV=production NODE_OPTIONS='--import=tsx' pnpm exec vite build",
99
"dev": "NODE_ENV=development NODE_OPTIONS='--import=tsx' env-cmd -f ../../.env pnpm exec vite",
10-
"dev:test": "NODE_ENV=test NODE_OPTIONS='--import=tsx' env-cmd -f ../../.env pnpm exec vite",
10+
"dev:test": "NODE_ENV=test NODE_OPTIONS='--import=tsx' env-cmd -f ../../.env pnpm exec vite --mode test",
1111
"format": "prettier --write src",
1212
"format:translations": "find src/translations -name '*.json' -exec pnpm exec sort-json {} \\;",
1313
"inject": "pnpm exec import-meta-env -x .env.public -p dist/index.html",

apps/web/src/routes/auth/login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const RouteComponent = () => {
8080

8181
export const Route = createFileRoute('/auth/login')({
8282
beforeLoad: async () => {
83-
if (import.meta.env.DEV && config.dev.isBypassAuthEnabled) {
83+
if (import.meta.env.DEV && import.meta.env.MODE !== 'test' && config.dev.isBypassAuthEnabled) {
8484
const { login } = useAppStore.getState();
8585
const response = await loginRequest({
8686
password: config.dev.password!,

0 commit comments

Comments
 (0)