← back to AsSeenInMovies
asseeninmovies: smoke +gzip header check on /movies (verifies compression middleware is wired). 57/57.
15d32a759e3aae80891088a4ff47e84e9c18815a · 2026-05-13 05:54:56 -0700 · SteveStudio2
Files touched
Diff
commit 15d32a759e3aae80891088a4ff47e84e9c18815a
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Wed May 13 05:54:56 2026 -0700
asseeninmovies: smoke +gzip header check on /movies (verifies compression middleware is wired). 57/57.
---
test/smoke.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/test/smoke.js b/test/smoke.js
index ac7d0d6..7cdd140 100644
--- a/test/smoke.js
+++ b/test/smoke.js
@@ -17,11 +17,11 @@ const { URL } = require('url');
const BASE = process.env.ASIM_URL || 'http://127.0.0.1:9742';
const TIMEOUT_MS = 8_000;
-function fetch(path) {
+function fetch(path, opts = {}) {
const u = new URL(path, BASE);
const lib = u.protocol === 'https:' ? https : http;
return new Promise((resolve, reject) => {
- const req = lib.get(u, { timeout: TIMEOUT_MS }, (res) => {
+ const req = lib.get(u, { timeout: TIMEOUT_MS, headers: opts.headers || {} }, (res) => {
let body = '';
res.on('data', (c) => (body += c));
res.on('end', () => resolve({ status: res.statusCode, headers: res.headers, body }));
@@ -138,6 +138,10 @@ function check(name, cond, hint = '') {
check('favicon: 200', r.status === 200);
check('favicon: image/svg', /image\/svg/.test(r.headers['content-type'] || ''));
+ // 14b. gzip negotiated
+ r = await fetch('/movies', { headers: { 'Accept-Encoding': 'gzip' } });
+ check('gzip /movies', (r.headers['content-encoding'] || '') === 'gzip');
+
// 15. /about + /privacy + /terms
r = await fetch('/about');
check('about: 200', r.status === 200);
← c212984 asseeninmovies: smoke --quiet flag prints only failures + fi
·
back to AsSeenInMovies
·
asseeninmovies: GET /api/spotted/random — JSON companion to 0f3342b →