n8n/packages/editor-ui/src/composables/useBugReporting.test.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
499 B
TypeScript
Raw Permalink Normal View History

import { describe, it, expect, vi } from 'vitest';
import { useBugReporting } from './useBugReporting';
vi.mock('@/composables/useDebugInfo', () => ({
useDebugInfo: () => ({
generateDebugInfo: () => 'mocked debug info',
}),
}));
describe('useBugReporting', () => {
it('should generate the correct reporting URL', () => {
const { getReportingURL } = useBugReporting();
const url = getReportingURL();
expect(url).toContain('mocked+debug+info');
expect(url).toMatchSnapshot();
});
});