Files
private_image/frontend/src/utils/share/buildZkViewerPath.spec.ts
T
nobswebdev 4376ed7ff1 Expand Vitest coverage for shared frontend utils.
Cover Axios error message extraction, generic error fallbacks, ArrayBuffer views used by Web Crypto, and share URL builders.
2026-10-19 23:05:46 +02:00

12 lines
419 B
TypeScript

import { describe, expect, it } from 'vitest';
import { buildZkViewerPath } from '@/utils/share/buildZkViewerPath';
describe('buildZkViewerPath', () => {
it('places upload id in the path and fragment key in the hash', () => {
const uploadId = 'abc-123';
const fragmentKey = 'dGVzdC1rZXk';
expect(buildZkViewerPath(uploadId, fragmentKey)).toBe(`/v/${uploadId}#${fragmentKey}`);
});
});