/** * Index exports test * This test ensures all exports from index.ts are accessible */ import { describe, it, expect } from 'vitest'; describe('Index exports', () => { it('should export IyzicoClient', async () => { const module = await import('../../src/index'); expect(module.IyzicoClient).toBeDefined(); expect(typeof module.IyzicoClient).toBe('function'); }); it('should export all error classes', async () => { const module = await import('../../src/index'); expect(module.IyzicoError).toBeDefined(); expect(module.IyzicoRequestError).toBeDefined(); expect(module.IyzicoResponseError).toBeDefined(); expect(typeof module.IyzicoError).toBe('function'); expect(typeof module.IyzicoRequestError).toBe('function'); expect(typeof module.IyzicoResponseError).toBe('function'); }); it('should export utility functions', async () => { const module = await import('../../src/index'); expect(module.generateRandomNumber).toBeDefined(); expect(module.generateRandomKey).toBeDefined(); expect(typeof module.generateRandomNumber).toBe('function'); expect(typeof module.generateRandomKey).toBe('function'); }); it('should be importable', async () => { // Just verify the module can be imported (this covers index.ts line 1) const module = await import('../../src/index'); expect(module).toBeDefined(); expect(Object.keys(module).length).toBeGreaterThan(0); }); });