Buckets:
| import { describe, expect, it } from 'vitest'; | |
| import { redactValue } from '$lib/utils/redact'; | |
| describe('redactValue', () => { | |
| it('returns [redacted] by default', () => { | |
| expect(redactValue('secret-token')).toBe('[redacted]'); | |
| }); | |
| it('shows last N characters when showLastChars is provided', () => { | |
| expect(redactValue('session-abc12', 5)).toBe('....abc12'); | |
| }); | |
| it('handles value shorter than showLastChars', () => { | |
| expect(redactValue('ab', 5)).toBe('....ab'); | |
| }); | |
| it('returns [redacted] when showLastChars is 0', () => { | |
| expect(redactValue('secret', 0)).toBe('[redacted]'); | |
| }); | |
| }); | |
Xet Storage Details
- Size:
- 606 Bytes
- Xet hash:
- c1140879ecb80c2c2f5bd2c9bc6cf7c723766a684e8d8c7f276ce4095b93a100
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.