fix(registry): restore protocol routing and test coverage for npm, oci, and api flows

This commit is contained in:
2026-03-22 08:59:34 +00:00
parent 2d84470688
commit 3b2aa57b7d
14 changed files with 312 additions and 109 deletions

View File

@@ -16,19 +16,23 @@ import {
post,
put,
setupTestDb,
startTestServer,
stopTestServer,
teardownTestDb,
} from '../helpers/index.ts';
describe('Organization API Integration', () => {
describe('Organization API Integration', { sanitizeResources: false, sanitizeOps: false }, () => {
let accessToken: string;
let testUserId: string;
beforeAll(async () => {
await setupTestDb();
await startTestServer();
});
afterAll(async () => {
await teardownTestDb();
await stopTestServer();
});
beforeEach(async () => {
@@ -116,8 +120,8 @@ describe('Organization API Integration', () => {
const response = await get('/api/v1/organizations', createAuthHeader(accessToken));
assertStatus(response, 200);
const body = response.body as Record<string, unknown>[];
assertEquals(body.length >= 2, true);
const body = response.body as { organizations: Record<string, unknown>[] };
assertEquals(body.organizations.length >= 2, true);
});
});
@@ -202,8 +206,8 @@ describe('Organization API Integration', () => {
);
assertStatus(response, 200);
const body = response.body as Record<string, unknown>[];
assertEquals(body.length >= 1, true); // At least the creator
const body = response.body as { members: Record<string, unknown>[] };
assertEquals(body.members.length >= 1, true); // At least the creator
});
it('should add member to organization', async () => {