feat(router): expose HEAD and OPTIONS decorators
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
6 files changed
+30
-5
No files matched your search
+8
-1
@@ -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']);
|
||||
});
|
||||
Reference in new issue
Block a user