Sifa professional network API (Fastify, AT Protocol, Jetstream)
sifa.id/
1import { describe, it, expect } from 'vitest';
2import { getTodayUtc, selectFeaturedProfile } from '../../src/services/featured-profile.js';
3
4describe('featured-profile service', () => {
5 describe('getTodayUtc', () => {
6 it('returns a valid YYYY-MM-DD date string', () => {
7 const today = getTodayUtc();
8 expect(today).toMatch(/^\d{4}-\d{2}-\d{2}$/);
9 });
10
11 it('returns a parseable date', () => {
12 const today = getTodayUtc();
13 const parsed = new Date(today + 'T00:00:00Z');
14 expect(parsed.getTime()).not.toBeNaN();
15 });
16 });
17
18 describe('selectFeaturedProfile', () => {
19 it('is exported as a function', () => {
20 expect(typeof selectFeaturedProfile).toBe('function');
21 });
22 });
23});