Files
core/test/smoke.test.ts
T
2026-08-02 20:40:02 -05:00

14 lines
499 B
TypeScript

import { expect, test } from 'vitest';
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']);
});