gijl/lv-storage / llama.cpp /tools /ui /tests /unit /redact.test.ts
gijl's picture
download
raw
606 Bytes
import { redactValue } from '$lib/utils/redact';
import { describe, expect, it } from 'vitest';
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:
6d81576b61c271e4feb75b4bb86b398ac13e6b3f74b51ed5e742ea820931d33d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.