test: add policy-service coverage and related service tests#6123
Open
mariana-andruk-qa wants to merge 1 commit into
Open
test: add policy-service coverage and related service tests#6123mariana-andruk-qa wants to merge 1 commit into
mariana-andruk-qa wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds unit and contract test coverage for
policy-service, plus a couple of related tests inguardian-serviceandapi-gateway.run-coverage.mjs,coverage-report.mjs,COVERAGE_NOTES.md) and ablock-aboutcontract test.build-documentation-urlshelper with accompanying unit tests.dmrvservice test (alias resolution) usingesmock.Test results
Run against freshly built
dist/output: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:
PolicyValidator.build()×2,SchemaValidatorproperty test) — fail with "ORM is not initialized" in a pure unit context.PolicyValidatorassertions expecttrue/falsebut 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.PolicyUtilshelpers:getDocumentTypereturnsVerifiableCredential/DID(tests expectvc-document/did-document);createVP/createVCset status to0(tests expectNEW).Notes
yarn.lockchanges were intentionally excluded (unrelated dependency churn).