test: fix auth test expectations and add test commands to Makefile
- Update auth.test.js to match current API error messages - Registration success message includes email verification notice - Duplicate credentials use generic message to prevent user enumeration - Add test commands to Makefile - make test: run all backend tests - make test-watch: run tests in watch mode - make test-coverage: run tests with coverage report All auth tests now pass (19/19 ✓)
This commit is contained in:
16
Makefile
16
Makefile
@@ -11,7 +11,8 @@ endif
|
||||
|
||||
.PHONY: help dev-cli prod-cli \
|
||||
dev-up dev-down dev-up-rebuild \
|
||||
prod-up prod-down prod-up-rebuild
|
||||
prod-up prod-down prod-up-rebuild \
|
||||
test test-watch test-coverage
|
||||
|
||||
help:
|
||||
@echo "Available targets:"
|
||||
@@ -23,6 +24,9 @@ help:
|
||||
@echo " make prod-up # docker compose --profile prod up -d"
|
||||
@echo " make prod-up-rebuild # docker compose --profile prod up -d --build"
|
||||
@echo " make prod-down # docker compose --profile prod down"
|
||||
@echo " make test # Run backend tests"
|
||||
@echo " make test-watch # Run backend tests in watch mode"
|
||||
@echo " make test-coverage # Run backend tests with coverage report"
|
||||
@echo "Notes: GNU Make nie wspiera subkomend z odstępami (np. 'make prod up')."
|
||||
@echo " Użyj odpowiednich celów z myślnikiem."
|
||||
|
||||
@@ -52,3 +56,13 @@ prod-up-rebuild:
|
||||
|
||||
prod-down:
|
||||
$(COMPOSE) --profile prod down
|
||||
|
||||
# Tests
|
||||
test:
|
||||
$(COMPOSE) exec $(BACKEND_SVC) npm test
|
||||
|
||||
test-watch:
|
||||
$(COMPOSE) exec $(BACKEND_SVC) npm run test:watch
|
||||
|
||||
test-coverage:
|
||||
$(COMPOSE) exec $(BACKEND_SVC) npm test -- --coverage
|
||||
|
||||
Reference in New Issue
Block a user