test(mobile): add API config unit tests

This commit is contained in:
saravanakumardb1 2026-04-06 11:18:29 -07:00
parent 9ff2348e1e
commit 4bb2d84152

View File

@ -0,0 +1,22 @@
import { describe, expect, it } from 'vitest';
import { PRODUCT_ID, PRODUCT_NAME, API_CONFIG } from './config';
describe('mobile API config', () => {
it('exports correct product identity', () => {
expect(PRODUCT_ID).toBe('notelett');
expect(PRODUCT_NAME).toBe('NoteLett');
});
it('API_CONFIG has expected shape', () => {
expect(API_CONFIG.productId).toBe('notelett');
expect(API_CONFIG.timeoutMs).toBe(15000);
expect(typeof API_CONFIG.platformBaseUrl).toBe('string');
expect(typeof API_CONFIG.productBaseUrl).toBe('string');
});
it('default URLs point to localhost', () => {
expect(API_CONFIG.platformBaseUrl).toContain('localhost');
expect(API_CONFIG.productBaseUrl).toContain('localhost');
expect(API_CONFIG.productBaseUrl).toContain('4016');
});
});