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:
@@ -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}`);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user