Skip to main content
Glama
orneryd

M.I.M.I.R - Multi-agent Intelligent Memory & Insight Repository

by orneryd
worker-3-output.md1.05 kB
# Task Output: worker-3 ```typescript import { describe, it, expect } from 'vitest'; describe('formatDate', () => { it('should return the date in short format for valid input', () => { const date = new Date('2023-10-01'); const result = formatDate(date, 'short'); expect(result).toBe(date.toLocaleDateString()); }); it('should return the date in long format for valid input', () => { const date = new Date('2023-10-01'); const result = formatDate(date, 'long'); expect(result).toBe( date.toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', }) ); }); it('should throw an error for an invalid date', () => { const invalidDate = new Date('invalid-date'); expect(() => formatDate(invalidDate, 'short')).toThrow('Invalid date'); }); it('should throw an error if the input is not a Date object', () => { expect(() => formatDate('2023-10-01' as any, 'short')).toThrow( 'Invalid date' ); }); }); ```

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/orneryd/Mimir'

If you have feedback or need assistance with the MCP directory API, please join our Discord server