mirror of
https://github.com/invoke-ai/InvokeAI
synced 2026-04-26 08:42:09 +02:00
Run vitest during frontend build (#9022)
* Run vitest during frontend build * Add frontend-test Make target
This commit is contained in:
parent
82f3dc9032
commit
be015a5434
5
Makefile
5
Makefile
@ -14,6 +14,7 @@ help:
|
||||
@echo "update-config-docstring Update the app's config docstring so mkdocs can autogenerate it correctly."
|
||||
@echo "frontend-install Install the pnpm modules needed for the frontend"
|
||||
@echo "frontend-build Build the frontend for localhost:9090"
|
||||
@echo "frontend-test Run the frontend test suite once"
|
||||
@echo "frontend-dev Run the frontend in developer mode on localhost:5173"
|
||||
@echo "frontend-typegen Generate types for the frontend from the OpenAPI schema"
|
||||
@echo "frontend-lint Run frontend checks and fixable lint/format steps"
|
||||
@ -57,6 +58,10 @@ frontend-install:
|
||||
frontend-build:
|
||||
cd invokeai/frontend/web && pnpm build
|
||||
|
||||
# Run the frontend test suite once
|
||||
frontend-test:
|
||||
cd invokeai/frontend/web && pnpm run test:run
|
||||
|
||||
# Run the frontend in dev mode
|
||||
frontend-dev:
|
||||
cd invokeai/frontend/web && pnpm dev
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"dev:host": "vite dev --host",
|
||||
"build": "pnpm run lint && vite build",
|
||||
"build": "pnpm run lint && vitest run && vite build",
|
||||
"typegen": "node scripts/typegen.js",
|
||||
"preview": "vite preview",
|
||||
"lint:knip": "knip --tags=-knipignore",
|
||||
@ -35,6 +35,7 @@
|
||||
"storybook": "storybook dev -p 6006",
|
||||
"build-storybook": "storybook build",
|
||||
"test": "vitest",
|
||||
"test:run": "vitest run",
|
||||
"test:ui": "vitest --coverage --ui",
|
||||
"test:no-watch": "vitest --no-watch"
|
||||
},
|
||||
|
||||
@ -39,6 +39,7 @@ export default defineConfig(({ mode }) => {
|
||||
host: '0.0.0.0',
|
||||
},
|
||||
test: {
|
||||
reporters: [['default', { summary: false }]],
|
||||
typecheck: {
|
||||
enabled: true,
|
||||
ignoreSourceErrors: true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user