Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite638f58

Browse files
jaggederestclaude
andcommitted
feat: refactor remote.ts for testability and add comprehensive tests
Refactor remote.ts by extracting 5 testable helper methods:- validateCredentials() - handles login flow and credential validation- createWorkspaceClient() - creates workspace REST client- setupBinary() - handles binary path setup for prod/dev modes- validateServerVersion() - checks server compatibility and features- fetchWorkspace() - fetches workspace with comprehensive error handlingAdd remote.test.ts with 17 comprehensive test cases covering:- Constructor and instance creation- Credential validation and login prompts- Binary setup for production and development modes- Server version validation and incompatibility handling- Workspace fetching with 404/401 error scenarios- Remote window management (close/reload operations)Benefits:- Improved code maintainability through method extraction- Reduced complexity in main setup() method- Comprehensive error scenario testing- Memory-efficient testing approach vs extensive mocking- Maintains all existing functionality while enabling better testingTotal test coverage: 274 tests across 14 files (14/17 source files = 82%)🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>
1 parentadc144b commite638f58

File tree

2 files changed

+664
-162
lines changed

2 files changed

+664
-162
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp