test(mobile): add API config unit tests
This commit is contained in:
parent
9ff2348e1e
commit
4bb2d84152
22
mobile/src/api/config.test.ts
Normal file
22
mobile/src/api/config.test.ts
Normal 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');
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user