b90ff252d1
Public archive with sidebar navigation, project pages, month archive, search and entry pages with image blocks. Admin area for brands, projects, post types, users, api clients, media and the entry editor with drag and drop images, preview per audience, scheduling and publish checks. Read and write API with bearer tokens, audience scoping, idempotent creation, OpenAPI document and editorial guide. Magic link login with configurable allowed domains, whole app behind the session gate. 456 tests including design rule checks.
17 lines
564 B
TypeScript
17 lines
564 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { loginDomains } from '~/lib/login-domains'
|
|
|
|
const fallback = ['nyo.de', 'pocketrocket.de', 'pocket-rocket.io']
|
|
|
|
describe('loginDomains', () => {
|
|
it('nimmt die Liste aus der Umgebung', () => {
|
|
expect(loginDomains('example.org, Beispiel.de')).toEqual(['example.org', 'beispiel.de'])
|
|
})
|
|
|
|
it('fällt ohne Angabe auf die drei Hausdomains zurück', () => {
|
|
expect(loginDomains(undefined)).toEqual(fallback)
|
|
expect(loginDomains('')).toEqual(fallback)
|
|
expect(loginDomains(' , ')).toEqual(fallback)
|
|
})
|
|
})
|