UNPKG

@purinton/modify

Version:

A modern, modular Discord moderation and utility bot with OpenAI-powered content moderation, multi-language support, and easy customization.

21 lines (19 loc) 682 B
import { jest } from '@jest/globals'; import fs from 'fs'; import path from 'path'; describe('All command handler files export a default function', () => { const commandsDir = path.join(process.cwd(), 'commands'); const files = fs.readdirSync(commandsDir).filter(f => f.endsWith('.mjs')); if (files.length === 0) { test('dummy test - no command handler files present', () => { expect(true).toBe(true); }); } for (const file of files) { const filePath = path.join(commandsDir, file); test(`${file} exports a default function`, async () => { const mod = await import(filePath); expect(typeof mod.default).toBe('function'); }); } });