Cover Axios error message extraction, generic error fallbacks, ArrayBuffer views used by Web Crypto, and share URL builders.
12 lines
419 B
TypeScript
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}`);
|
|
});
|
|
});
|