refactor: restructure tests to mirror src/ and expand coverage - #33
Merged
Conversation
## Test Structure Changes - api/providers/unified.test.ts → api/UnifiedProvider.test.ts - ui/components/commonButton.test.ts → ui/components/common/CommonButton.test.ts - ui/components/commonNotice.test.ts → ui/components/common/CommonNotice.test.ts - ui/containers/apiContainer.test.ts → ui/containers/Api.test.ts - ui/containers/frontmatterContainer.test.ts → ui/containers/Frontmatter.test.ts - ui/containers/tagContainer.test.ts → ui/containers/Tag.test.ts ## New Tests Added - __tests__/api/prompt.test.ts (19 tests) - __tests__/frontmatter/index.test.ts expanded (32 tests) - __tests__/utils/index.test.ts (38 tests) ## Mock Improvements - Added Obsidian API mocks: getFrontMatterInfo, parseFrontMatterStringArray, getAllTags - Added MetadataCache and TFile classes for testing Total: 134 tests across 10 test suites 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/directory structure exactlyTest Structure Changes (Mirror Pattern)
api/providers/unified.test.tsapi/UnifiedProvider.test.tsui/components/commonButton.test.tsui/components/common/CommonButton.test.tsui/components/commonNotice.test.tsui/components/common/CommonNotice.test.tsui/containers/apiContainer.test.tsui/containers/Api.test.tsui/containers/frontmatterContainer.test.tsui/containers/Frontmatter.test.tsui/containers/tagContainer.test.tsui/containers/Tag.test.tsNew Tests Added
__tests__/api/prompt.test.ts- Tests for prompt template generation__tests__/frontmatter/index.test.ts- Tests for frontmatter utilities__tests__/utils/index.test.ts- Tests for utility functionsCoverage
Test plan
🤖 Generated with Claude Code