UNPKG

vibe-janitor

Version:

A CLI tool that cleans AI-generated JavaScript/TypeScript projects efficiently and intelligently

35 lines (34 loc) 1.33 kB
import { Logger } from '../utils/logger.js'; describe('Logger Module', () => { test('should log messages with different levels', () => { // These are just simple coverage tests to ensure no errors are thrown Logger.log('regular message'); Logger.info('info message'); Logger.success('success message'); Logger.warn('warning message'); Logger.error('error message'); Logger.welcome(); // Pass if no exceptions expect(true).toBe(true); }); test('should handle progress displays', () => { // Simple coverage test - start and immediately stop Logger.startProgress(); Logger.stopProgress(); // Pass if no exceptions expect(true).toBe(true); }); test('should run task with progress indication', async () => { // Simple task that resolves const mockTask = async () => 'result'; // Run with minimal phases const result = await Logger.runWithProgress(mockTask, 1, ['Testing']); // Check result returned correctly expect(result).toBe('result'); }); test('should format paths', () => { // Verify the method runs without errors const result = Logger.formatPath('/some/path'); expect(typeof result).toBe('string'); }); });