char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
92d1bb0c9
char/aliceai-t5-moe
1import { redactValue } from '$lib/utils/redact' ; 2import { describe , expect , it } from 'vitest' ; 3 4describe ( 'redactValue' , () => { 5it ( 'returns [redacted] by default' , () => { 6expect ( redactValue ( 'secret-token' )). toBe ( '[redacted]' ); 7}); 8 9it ( 'shows last N characters when showLastChars is provided' , () => { 10expect ( redactValue ( 'session-abc12' , 5 )). toBe ( '....abc12' ); 11}); 12 13it ( 'handles value shorter than showLastChars' , () => { 14expect ( redactValue ( 'ab' , 5 )). toBe ( '....ab' ); 15}); 16 17it ( 'returns [redacted] when showLastChars is 0' , () => { 18expect ( redactValue ( 'secret' , 0 )). toBe ( '[redacted]' ); 19}); 20});