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
- Untestable Node.js APIs → Create proxy abstraction functions (use function overloads to preserve intelligent typing while making functions mockable)
575
591
576
592
## 🧠 Agent Learnings
593
+
577
594
- Avoid testing exact error messages or log output - assert only that errors are thrown or rejection occurs to prevent brittle tests (1)
578
595
- Create shared mock helpers (e.g., `createMockLogOutputChannel()`) instead of duplicating mock setup across multiple test files (1)
579
-
596
+
- When stubbing VS Code API functions in unit tests, always check the implementation imports first - if the code uses wrapper functions (like `commandApi.executeCommand()`, `workspaceApis.getConfiguration()`, `windowApis.showInformationMessage()`), stub the wrapper function instead of the raw VS Code module. Stubbing raw VS Code modules (e.g., `sinon.stub(commands, 'executeCommand')`) causes "Cannot stub non-existent property" errors because those modules aren't exported in the test environment (2)
0 commit comments