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.
This commit is contained in:
2026-10-19 23:05:46 +02:00
parent afbd5e204c
commit 4376ed7ff1
5 changed files with 173 additions and 0 deletions
@@ -0,0 +1,11 @@
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}`);
});
});