Add a test

This commit is contained in:
Michael Hines 2025-08-25 00:28:38 -05:00 committed by Wirasm
parent e1d3c6ed20
commit 356745814a

View File

@ -35,7 +35,9 @@ describe('API Configuration', () => {
it('should return empty string in production mode', async () => { it('should return empty string in production mode', async () => {
// Set production mode // Set production mode
(import.meta.env as any).PROD = true; (import.meta.env as any).PROD = true;
delete (import.meta.env as any).VITE_API_URL;
// It should not use VITE_API_URL
(import.meta.env as any).VITE_API_URL = 'http://custom-api:9999';
const { getApiUrl } = await import('../../src/config/api'); const { getApiUrl } = await import('../../src/config/api');
expect(getApiUrl()).toBe(''); expect(getApiUrl()).toBe('');