Skip to content

test(server): unit tests for budget and agent-instructions pure helpers#155

Open
anhermon wants to merge 1 commit into
masterfrom
test/server-pure-utils-155
Open

test(server): unit tests for budget and agent-instructions pure helpers#155
anhermon wants to merge 1 commit into
masterfrom
test/server-pure-utils-155

Conversation

@anhermon

Copy link
Copy Markdown
Owner

Summary

  • budgets.ts — 25 tests covering currentUtcMonthWindow, resolveWindow, budgetStatusFromObserved, and normalizeScopeName
  • agent-instructions.ts — 55 tests covering asRecord, asString, isBundleMode, inferLanguage, isMarkdown, shouldIgnoreInstructionsEntry, and normalizeRelativeFilePath

All helpers are pure functions with no I/O dependencies, replicated inline in the test files so the tests remain stable against import graph changes.

Test plan

  • CI verify passes
  • All 80 new tests pass
  • No regressions in existing test suite

…ns pure functions

- budgets.ts: 25 tests for currentUtcMonthWindow, resolveWindow,
  budgetStatusFromObserved, and normalizeScopeName
- agent-instructions.ts: 55 tests for asRecord, asString, isBundleMode,
  inferLanguage, isMarkdown, shouldIgnoreInstructionsEntry, and
  normalizeRelativeFilePath

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@github-actions

Copy link
Copy Markdown

Benchmark Score: 86/100 (passing)

Dimension Score Weight
tests 100.0 15%
coverage 69.7 20%
typecheck 100.0 10%
build 100.0 10%
security 70.0 15%
codeHealth 81.8 15%
lint 96.4 10%
docs 93.5 5%

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