Skip to content

test: add edge case tests for assertNonEmptyValue guard (Issue #152) - #204

Open
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-152-assert-guards-edge-cases
Open

test: add edge case tests for assertNonEmptyValue guard (Issue #152)#204
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-152-assert-guards-edge-cases

Conversation

@rafaio1

@rafaio1 rafaio1 commented Aug 26, 2026

Copy link
Copy Markdown

Summary

Adds edge case unit tests for assertNonEmptyValue covering whitespace-only strings, padded valid strings, default vs overridden error codes, and details.fieldName correctness.

Tests Added

  • ✅ Whitespace-only string rejected with INVALID_TASK
  • ✅ Padded non-empty string accepted
  • ✅ Default INVALID_TASK code used when not overridden
  • ✅ Overridden EXECUTION_FAILED code respected
  • details.fieldName matches input parameter
  • ✅ Single space rejected; single non-whitespace character accepted

Verification

All 7 tests pass locally via npx vitest run tests/guards/runtime-guards-edge-cases.test.ts.

Closes #152

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.

[Bounty: $30] Add unit tests for assertNonEmptyValue guard edge cases

1 participant