import { DyNTS_StaticClient_Settings } from './static-client-settings.interface'; describe('| DyNTS_StaticClient_Settings', () => { it('| should allow minimal settings with only root', () => { const s: DyNTS_StaticClient_Settings = { root: '/dist' }; expect(s.root).toBe('/dist'); expect(s.fallbackPath).toBeUndefined(); }); it('| should allow optional fallbackPath', () => { const s: DyNTS_StaticClient_Settings = { root: '/dist', fallbackPath: 'index.html', }; expect(s.fallbackPath).toBe('index.html'); }); it('| should allow SPA cache options', () => { const s: DyNTS_StaticClient_Settings = { root: '/dist', assetCacheMaxAge: 31536000, assetCacheImmutable: true, fallbackCacheMaxAge: 0, }; expect(s.assetCacheMaxAge).toBe(31536000); expect(s.assetCacheImmutable).toBe(true); expect(s.fallbackCacheMaxAge).toBe(0); }); });