Add mock data and unit tests for Channels and Members APIs

This commit is contained in:
2025-12-07 04:41:41 -05:00
parent 4673547b95
commit 58a938d0e7
12 changed files with 1377 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
import {describe, expect, it} from 'bun:test';
import {HttpMethod} from '../../../../src/net/http/HttpMethod';
describe('HttpMethod', () => {
describe('when accessing enum values', () => {
it('should return "GET" for GET method', () => {
expect(HttpMethod.GET).toBe('GET');
});
it('should return "POST" for POST method', () => {
expect(HttpMethod.POST).toBe('POST');
});
it('should return "PUT" for PUT method', () => {
expect(HttpMethod.PUT).toBe('PUT');
});
it('should return "PATCH" for PATCH method', () => {
expect(HttpMethod.PATCH).toBe('PATCH');
});
it('should return "DELETE" for DELETE method', () => {
expect(HttpMethod.DELETE).toBe('DELETE');
});
it('should return "OPTIONS" for OPTIONS method', () => {
expect(HttpMethod.OPTIONS).toBe('OPTIONS');
});
it('should return "HEAD" for HEAD method', () => {
expect(HttpMethod.HEAD).toBe('HEAD');
});
});
describe('when enumerating all methods', () => {
it('should contain exactly 7 HTTP methods', () => {
const methodCount = Object.keys(HttpMethod).length;
expect(methodCount).toBe(7);
});
});
});