-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
The VS Code extension providers lack unit test coverage. Currently only stacTreeProvider has tests (8 tests). The remaining 4 providers have no test coverage:
layersTreeProvider- Manages track/location/result layer display in sidebaroutlineProvider- Provides document outline for plot structurestacFileSystemProvider- Virtual filesystem for STAC catalog browsingtoolsTreeProvider- Displays available analysis tools based on selection context
Scope
Create comprehensive unit tests for each provider:
layersTreeProvider
-
setTracks()/setLocations()/setResultLayers()- data management -
getTreeItem()/getChildren()- tree structure - Visibility toggling
- Layer removal
- Event firing on data changes
outlineProvider
- Symbol generation from plot data
- Hierarchical structure (tracks → positions, locations)
- Symbol kinds and icons
stacFileSystemProvider
-
stat()- file/directory metadata -
readDirectory()- catalog/item listing -
readFile()- JSON content retrieval - Error handling for missing paths
toolsTreeProvider
- Tool filtering based on selection context
-
getTreeItem()/getChildren()- tree structure - Tool categorization
- Empty state handling
Test Strategy
- Mock VS Code APIs (
vscode.TreeItem,vscode.EventEmitter, etc.) - Use vitest with existing test infrastructure
- Follow patterns from
stacTreeProvider.test.ts - Test data transformations and state management, not VS Code integration
Acceptance Criteria
- All 4 providers have test files
- Each provider has >80% code coverage
- Tests validate data flow and state management
- Tests don't require VS Code runtime (pure unit tests)
References
- Existing:
tests/unit/stacTreeProvider.test.ts(pattern to follow) - Source:
src/providers/*.ts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels