-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Summary
WelcomeComponent has a spec.md (added in #68) but no unit test file. The component has two async methods (onCreateSpec, onImport) with meaningful branching logic that should be tested.
Recommended test cases
| Scenario | Description |
|---|---|
| Create spec → navigates | onCreateSpec() calls store.createSpec() and navigates to /edit/:id |
| Create spec → no id | If createSpec() returns without id, no navigation |
| Import single file | File picker → read → importMarkdownFiles() → navigate to last spec |
| Import multiple files | Multiple files imported, navigates to the last one |
| Import cancelled | No files selected → no action |
| Import returns 0 | importMarkdownFiles() returns 0 → no navigation |
Files
- Source:
src/app/components/welcome/welcome.ts - Spec:
specs/components/welcome.spec.md - Test (to create):
src/app/components/welcome/welcome.spec.ts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels