Skip to content

Add test suite for core functionality#2

Merged
adityamiskin merged 1 commit intomainfrom
add-tests
Jan 8, 2026
Merged

Add test suite for core functionality#2
adityamiskin merged 1 commit intomainfrom
add-tests

Conversation

@adityamiskin
Copy link
Owner

Summary

This PR adds a comprehensive test suite to address the low test coverage issue (only 2 test files vs 57 source files).

Changes

  • 24 new unit tests across 3 test files:
    • src/__tests__/prompts.test.ts - Tests for prompt building functions
    • src/__tests__/skills.test.ts - Tests for skills formatting
    • src/__tests__/skills_loader.test.ts - Tests for skills section formatting

Test Coverage

  • buildSystemPrompt() - Base prompt handling, skills integration
  • buildSubAgentSystemPrompt() - Sub-agent prompt building
  • formatSkillsSection() - Skills XML formatting, XML escaping, multiple skills
  • baseSystemPrompt - Contains expected Loki characteristics
  • baseSubAgentSystemPrompt - Sub-agent role and strategy

Additional Changes

  • Added bun test script to package.json for running tests

Verification

All 24 tests pass:

bun test src/__tests__/*.test.ts
24 pass | 0 fail

- Add 24 unit tests across 3 test files
- Test prompts.ts: buildSystemPrompt and buildSubAgentSystemPrompt functions
- Test skills.ts: formatSkillsSection function
- Add bun test script to package.json
@adityamiskin adityamiskin merged commit e868f39 into main Jan 8, 2026
1 check failed
@adityamiskin adityamiskin deleted the add-tests branch January 8, 2026 21:38
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