Skip to content

test: add SessionManager unit coverage - #18

Open
edgepillar wants to merge 1 commit into
digitalSloth:mainfrom
edgepillar:test/session-manager-unit-tests
Open

test: add SessionManager unit coverage#18
edgepillar wants to merge 1 commit into
digitalSloth:mainfrom
edgepillar:test/session-manager-unit-tests

Conversation

@edgepillar

Copy link
Copy Markdown

Summary

  • Add Vitest as the test runner and replace the placeholder npm test command with vitest run.
  • Add five deterministic unit tests for SessionManager.
  • Update the testing documentation in README.md, docs/ARCHITECTURE.md, and CLAUDE.md.

Test coverage

  • Retain and return an unlocked opaque keystore.
  • Lock one address without locking another.
  • Remove all sessions with lockAll().
  • Lazily evict an expired session when it is accessed.
  • Filter expired sessions while retaining a more recently unlocked session.

Validation

  • npm test — passed (1 test file, 5 tests).
  • npm run typecheck — passed with zero errors.
  • npm run lint — passed with zero errors and 6 existing warnings.
  • npm run build — passed.
  • npm run build:extension — passed.
  • npm audit --audit-level=critical — passed with zero critical advisories.
  • git diff --check — passed.

Notes

  • Production SessionManager behavior is unchanged.
  • No CI workflow is added or changed.
  • This is a follow-up to the testing discussion in PR feat: refactor service classes #14.

@edgepillar
edgepillar marked this pull request as ready for review August 26, 2026 16: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