Add mock data and unit tests for Channels and Members APIs
This commit is contained in:
41
test/unit/net/http/HttpMethod.test.ts
Normal file
41
test/unit/net/http/HttpMethod.test.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user