You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(agentflow): remove unused components, fix connector anchor bug, and enhance test coverage
- Deleted unused Input and ConfirmDialog components to streamline the codebase.
- Updated jest.config.js to improve coverage thresholds and exclude deprecated hooks.
- Enhanced test coverage for useAgentflow and AgentflowContext with new E2E tests.
- Adjusted architecture documentation to reflect the removal of components and updated file structure.
|`.test.ts`|**node** (no DOM) | Pure logic — utilities, reducers, data transformations |
127
+
|`.test.tsx`|**jsdom** (browser DOM) | Anything that renders React — `renderHook` with providers, component tests |
128
+
129
+
**Source files** follow a different rule: use `.tsx` only when the file contains JSX syntax. A React hook like `useAgentflow.ts` has no JSX, so it stays `.ts` even though its test file is `.test.tsx` (because the test uses `renderHook` with a JSX wrapper).
130
+
122
131
## Configuration
123
132
124
133
-**Jest config**: `jest.config.js` — two projects: `unit` (node env, `.test.ts`) and `components` (custom jsdom env, `.test.tsx`)
125
134
-**Test environment**: Component tests use custom jsdom environment (`src/__test_utils__/jest-environment-jsdom.js`) to handle canvas loading
126
135
-**Import aliases**: `@test-utils` maps to `src/__test_utils__` for convenient imports
0 commit comments