Files
kuekhaoyang 3771b63332 feat: add self-contained strict verification chain
Keep every post-59948b5 change inside verification/. The verifier owns its npm working directory and sanitized Docker context, so no release metadata or root Docker configuration is modified.
2026-08-02 06:11:13 +08:00

15 lines
539 B
TypeScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { authenticationRequiredResponse } from '../../../lib/server/api-responses';
// GH-ISSUE: 204,226; GH-PR: 227
test('authenticationRequiredResponse returns a 401 JSON response', async () => {
const response = authenticationRequiredResponse();
assert.equal(response.status, 401);
assert.equal(response.headers.get('content-type')?.includes('application/json'), true);
assert.deepEqual(await response.json(), { error: 'Authentication required' });
});