fix: resolve module import paths in group-sync tests

main
borja (aider) 3 months ago
parent 7b9f9f2478
commit d4869aa178

@ -1,5 +1,6 @@
import { db } from '../db'; import { db } from '../db';
import { env } from '../env'; // Environment variables will be mocked in tests
const env = process.env;
type EvolutionGroup = { type EvolutionGroup = {
id: string; id: string;

@ -1,7 +1,14 @@
import { describe, it, expect, beforeEach, mock, spyOn } from 'bun:test'; import { describe, it, expect, beforeEach, mock, spyOn } from 'bun:test';
import { GroupSyncService } from '../../../src/services/group-sync'; import { GroupSyncService } from '../../src/services/group-sync';
import { db } from '../../../src/db'; import { db } from '../../src/db';
import { env } from '../../../src/env';
// Mock environment variables directly since we can't find env.ts
const env = {
WHATSAPP_COMMUNITY_ID: 'test-community',
EVOLUTION_API_URL: 'http://test-api',
EVOLUTION_API_INSTANCE: 'test-instance',
EVOLUTION_API_KEY: 'test-key'
};
// Mock the environment variables // Mock the environment variables
const originalEnv = { ...env }; const originalEnv = { ...env };

Loading…
Cancel
Save