docs(production): standardiserad produktionsberedskap och gap-analys
Lägger docs/production-readiness.md och siax/production-gaps.json enligt SIAX Master Definition of Done. Underlag: git-, kod- och live-evidens 2026-11-11. Nivån är evidensbaserad, inte ett leveransgodkännande.
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import {
|
||||
LOGIN_METHOD_COOKIE,
|
||||
isLoginMethod,
|
||||
persistLoginMethodHint,
|
||||
} from '@/lib/auth/login-method'
|
||||
|
||||
describe('isLoginMethod', () => {
|
||||
it('accepts the two supported methods', () => {
|
||||
expect(isLoginMethod('bankid')).toBe(true)
|
||||
expect(isLoginMethod('email')).toBe(true)
|
||||
})
|
||||
|
||||
it('rejects anything else', () => {
|
||||
expect(isLoginMethod('google')).toBe(false)
|
||||
expect(isLoginMethod('password')).toBe(false)
|
||||
expect(isLoginMethod('')).toBe(false)
|
||||
expect(isLoginMethod(undefined)).toBe(false)
|
||||
expect(isLoginMethod(null)).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
describe('persistLoginMethodHint', () => {
|
||||
it('is a no-op outside the browser', () => {
|
||||
expect(() => persistLoginMethodHint('email')).not.toThrow()
|
||||
})
|
||||
})
|
||||
|
||||
describe('LOGIN_METHOD_COOKIE', () => {
|
||||
// New wire identifiers use the accounted name; only pre-rebrand ones keep
|
||||
// the gnubok prefix. Locks the name so a rename cannot silently strand the
|
||||
// stored hints of every returning user.
|
||||
it('stays on the accounted name', () => {
|
||||
expect(LOGIN_METHOD_COOKIE).toBe('accounted-login-method')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user