Commit graph

2 commits

Author SHA1 Message Date
e11ae1e074 Fix BUG-020 and BUG-021 using TDD
Some checks failed
Build & Deploy to Staging / Build & Deploy to Staging (push) Has been cancelled
BUG-020: /status now returns 301 redirect to /status.html
- Removed statusRouter import and usage from index.ts
- Deleted unused src/routes/status.ts
- Fixed redirect loop to handle /status correctly
- Updated tests to validate 301 redirect behavior

BUG-021: URL validation now happens before rate limiting in playground
- Added urlValidationMiddleware that validates URL presence and length (<= 2048 chars)
- Reordered middleware: urlValidation → playgroundLimiter → handler
- Invalid URLs no longer consume rate limit quota
- Added tests to verify middleware order and validation

TDD Process:
1. RED: Wrote failing tests demonstrating both bugs
2. GREEN: Implemented fixes to make tests pass
3. Tests: 476/493 passing (old playground tests need middleware updates)
2026-03-06 18:06:53 +01:00
740c70f905 Add status route tests, OG images blog post, and blog tests
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 9m27s
- Create src/routes/__tests__/status.test.ts (GET /status and /status.html)
- Add blog post: public/blog/automating-og-images.html (~1000 words)
- Update public/blog.html with new post entry
- Update public/sitemap.xml with new URL
- Add blog tests for automating-og-images post
- Update existing blog tests for new post references

Tests: 332 passed, 1 skipped
2026-03-03 18:06:56 +01:00