Skip to content

Add unit tests for the data layer - #5

Merged
LemurDaniel merged 1 commit into
mainfrom
tests/data-layer-unit-tests
Oct 31, 2026
Merged

LemurDaniel merged 1 commit into
mainfrom
tests/data-layer-unit-tests

Conversation

@LemurDaniel

@LemurDaniel LemurDaniel commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Unit tests for DevOps.rest (11): paths per scope (None/Organization/Project/Team), query merge, space encoding, body and content type, BOM handling, error handling, organization from the current user
  • Unit tests for Project (10): default/custom path, {{HOME_DIR}} replacement, project path, getResources caching (refresh, TTL, context)
  • vscode stub (test/unit/helpers/vscode.js) via Module._load; https.request is mocked per test, no new dependencies
  • Removed the unused sample integration suite (test/suite, test/runTest.js, launch config, @vscode/test-electron); npm test now runs the unit tests

Test plan

  • mocha --ui tdd test/unit: 41 passing (Node 22)
  • eslint .: no errors
  • CI unit tests green

Note: Mocha 12 needs Node ≥ 22 (require(esm)), CI already uses 22.x.

🤖 Generated with Claude Code

- vscode stub for unit tests (test/unit/helpers/vscode.js)
- DevOps.rest: paths per scope, query merge, body, error handling
- Project: path resolution, {{HOME_DIR}}, getResources caching
- Remove the unused test-electron sample suite; npm test runs the unit tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LemurDaniel
LemurDaniel merged commit 635a08f into main Oct 31, 2026
2 checks passed
@LemurDaniel
LemurDaniel deleted the tests/data-layer-unit-tests branch October 31, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant