feat(router): expose HEAD and OPTIONS decorators

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-08-02 20:40:02 -05:00
1 parent 8e38fffd77
commit 63be0ef8f7
6 files changed
+30 -5

No files matched your search

+8 -1
View File
@@ -1,6 +1,13 @@
import { expect, test } from 'vitest';
import { VERSION } from '../src/index';
import { Head, Options, VERSION, type HttpMethod } from '../src/index';
test('package loads and exposes a CalVer VERSION', () => {
expect(VERSION).toMatch(/^\d{2}\.\d{1,2}\.\d+(-beta\.\d+)?$/);
});
test('public barrel exports HEAD and OPTIONS route decorators', () => {
const methods: HttpMethod[] = ['HEAD', 'OPTIONS'];
expect(Head).toBeTypeOf('function');
expect(Options).toBeTypeOf('function');
expect(methods).toEqual(['HEAD', 'OPTIONS']);
});