Skip to content

test: add policy-service coverage and related service tests#6123

Open
mariana-andruk-qa wants to merge 1 commit into
hashgraph:developfrom
mariana-andruk-qa:test/6102-policy-service-coverage
Open

test: add policy-service coverage and related service tests#6123
mariana-andruk-qa wants to merge 1 commit into
hashgraph:developfrom
mariana-andruk-qa:test/6102-policy-service-coverage

Conversation

@mariana-andruk-qa
Copy link
Copy Markdown

Summary

Adds unit and contract test coverage for policy-service, plus a couple of related tests in guardian-service and api-gateway.

  • policy-service: unit tests for block validators, blocks, helpers, decorators, errors, and policy-engine utilities, plus V8/c8 coverage tooling (run-coverage.mjs, coverage-report.mjs, COVERAGE_NOTES.md) and a block-about contract test.
  • guardian-service: new build-documentation-urls helper with accompanying unit tests.
  • api-gateway: dmrv service test (alias resolution) using esmock.

Test results

Run against freshly built dist/ output:

Service Passing Failing
api-gateway 12 0
guardian-service 16 0
policy-service 1195 12

Known failing policy-service tests (12)

These are included as-is and still need follow-up; they are not import/setup regressions in unrelated code:

  • 3× require an initialized ORM (PolicyValidator.build() ×2, SchemaValidator property test) — fail with "ORM is not initialized" in a pure unit context.
  • PolicyValidator assertions expect true/false but the implementation returns the validator object.
  • CommonBlock-delegating validators (TransformationUIAddon, HttpRequestUIAddon) expect no errors for empty options, but the validators correctly report required-field errors.
  • PolicyUtils helpers: getDocumentType returns VerifiableCredential/DID (tests expect vc-document/did-document); createVP/createVC set status to 0 (tests expect NEW).

Notes

  • yarn.lock changes were intentionally excluded (unrelated dependency churn).

Add unit and contract tests for policy-service block validators, blocks, helpers, decorators, errors, and policy-engine utilities, plus V8/c8 coverage tooling. Also add the guardian-service build-documentation-urls helper with its tests and an api-gateway dmrv service test.
@mariana-andruk-qa mariana-andruk-qa requested review from a team as code owners May 26, 2026 15:35
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.

2 participants