Initial commit: Brachnha Insight project setup
- Next.js 14+ with App Router and TypeScript - Tailwind CSS and ShadCN UI styling - Zustand state management - Dexie.js for IndexedDB (local-first data) - Auth.js v5 for authentication - BMAD framework integration Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
20
tests/component/DeleteEntryDialog.test.tsx
Normal file
20
tests/component/DeleteEntryDialog.test.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
import { render, screen, fireEvent } from '@testing-library/react';
|
||||
// import { DeleteEntryDialog } from '../../src/components/journal/DeleteEntryDialog';
|
||||
|
||||
describe('DeleteEntryDialog', () => {
|
||||
it('should show dialog and optimistically remove item from UI on confirm', async () => {
|
||||
// GIVEN: Dialog is open
|
||||
// const onDeleteMock = vi.fn();
|
||||
// render(<DeleteEntryDialog isOpen={true} onDelete={onDeleteMock} />);
|
||||
|
||||
// WHEN: 'Delete' confirmed
|
||||
// fireEvent.click(screen.getByText('Delete'));
|
||||
|
||||
// THEN: Dialog closes and onConfirm called
|
||||
// expect(onDeleteMock).toHaveBeenCalled();
|
||||
|
||||
// For failing test purpose
|
||||
expect(true).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user