import { TapStat, useTapQuery } from '@tappify/extension-sdk';
import { renderWithTap } from '@tappify/extension-sdk/testing';
import { screen, waitFor } from '@testing-library/react';
import { expect, it } from 'vitest';
function Crashes() {
const crashes = useTapQuery({
kind: 'crashes',
range: { from: '2026-09-01', to: '2026-09-08' },
});
return <TapStat label="Issues" value={crashes.data?.issues.length ?? 0} />;
}
it('renders the issues the fixtures answer with', async () => {
renderWithTap(<Crashes />, { scopes: ['ui:render', 'crashes:read'] });
await waitFor(() => expect(screen.getByText('2')).toBeTruthy());
});