Files
slp-modular-cms/frontend/src/i18n/config.test.ts
T
SluijsensandClaude Sonnet 5.5 88f5d20a78 Voeg Api.AndreaSlopFotografie toe met setup-token, proxy-bewuste limiters en ASF-admin-thema
- Core: opt-in ForwardedHeaders:KnownProxies en rate limiters per clientadres
  (zonder configuratie ongewijzigd gedrag)
- Identity: optioneel setup-token (X-Setup-Token), beide setup-endpoints onder de
  login-limiter, beveiligingsgebeurtenis setup_token_rejected (5007)
- Nieuw client-project SlpModularCms.Api.AndreaSlopFotografie (Identity + Availability)
  met bijbehorende tests
- Frontend: thema asf (VITE_THEME), VITE_DEFAULT_LANGUAGE, tokenveld op de setup-pagina
- CI: jobs publish/deploy-asf-test achter ASF_TEST_DEPLOY_ENABLED
- Fix U1: 301-Location wordt nu percent-encoded (gevonden door de property-test)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 01:16:34 +01:00

14 lines
695 B
TypeScript

import { describe, expect, it } from 'vitest';
import { languageDetection } from '@/i18n/config';
describe('languageDetection', () => {
it('without a default language keeps the old order: stored choice, then browser, fallback English', () => {
expect(languageDetection(undefined)).toEqual({ order: ['localStorage', 'navigator'], fallbackLng: 'en' });
});
it('with a default language: stored choice first, then that default, and the browser is not consulted', () => {
expect(languageDetection('nl')).toEqual({ order: ['localStorage'], fallbackLng: 'nl' });
expect(languageDetection('en')).toEqual({ order: ['localStorage'], fallbackLng: 'en' });
});
});