← back to Stars of Design
starsofdesign: smoke — add /api discovery doc check (+2 assertions). 42/42.
a32feca4f3e652f10bb692cd565461f5ea5afe5b · 2026-05-12 20:08:44 -0700 · Steve Abrams
Files touched
Diff
commit a32feca4f3e652f10bb692cd565461f5ea5afe5b
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue May 12 20:08:44 2026 -0700
starsofdesign: smoke — add /api discovery doc check (+2 assertions). 42/42.
---
test/smoke.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/test/smoke.js b/test/smoke.js
index 21fba75..6855f9f 100644
--- a/test/smoke.js
+++ b/test/smoke.js
@@ -87,7 +87,12 @@ function check(name, cond, hint = '') {
check('client/:slug: Person', /"@type":"Person"/.test(r.body));
check('client/:slug: Breadcrumb', /"@type":"BreadcrumbList"/.test(r.body));
- // 8. /api/stats
+ // 8a. /api — discovery doc
+ r = await fetch('/api');
+ check('api: 200', r.status === 200);
+ check('api: discovery doc', /endpoints/.test(r.body) && /Stars of Design API/.test(r.body));
+
+ // 8b. /api/stats
r = await fetch('/api/stats');
check('api/stats: 200', r.status === 200);
check('api/stats: designers field', /"designers":/.test(r.body));
← 6e94cda starsofdesign: GET /api — JSON discovery doc for public API
·
back to Stars of Design
·
starsofdesign: gzip compression middleware (threshold 1KB) — 13a504c →