From cc96940362522116db213c903a3ef4de1a25fa73 Mon Sep 17 00:00:00 2001 From: Deco Vander Date: Sat, 5 Jul 2025 21:47:28 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- tests/setup.ts | 5 +---- tests/unit/services/ProfanityFilterService.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/setup.ts b/tests/setup.ts index fc1f0f1..8b13142 100644 --- a/tests/setup.ts +++ b/tests/setup.ts @@ -7,10 +7,7 @@ process.env.NODE_ENV = 'test'; process.env.ADMIN_PASSWORD = 'test_admin_password'; process.env.MAPBOX_ACCESS_TOKEN = 'pk.test_token_here'; -// Test database paths -export const TEST_DB_PATH = path.join(__dirname, 'test_icewatch.db'); -export const TEST_PROFANITY_DB_PATH = path.join(__dirname, 'test_profanity.db'); - +// Removed unused constants TEST_DB_PATH and TEST_PROFANITY_DB_PATH // Helper function to create test database export const createTestDatabase = (): Promise => { return new Promise((resolve, reject) => { diff --git a/tests/unit/services/ProfanityFilterService.test.ts b/tests/unit/services/ProfanityFilterService.test.ts index 164feeb..7a376e7 100644 --- a/tests/unit/services/ProfanityFilterService.test.ts +++ b/tests/unit/services/ProfanityFilterService.test.ts @@ -105,8 +105,8 @@ describe('ProfanityFilterService', () => { const lowResult = profanityFilter.analyzeProfanity('damn'); const mediumResult = profanityFilter.analyzeProfanity('shit'); - expect(['low', 'medium']).toContain(lowResult.severity); - expect(['medium', 'high']).toContain(mediumResult.severity); + expect(lowResult.severity).toBe('low'); + expect(mediumResult.severity).toBe('medium'); }); it('should handle multiple profanity words', () => {