fix #760 wrapped-keys test to expect a single ACC object instead of an array #761
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.
Description
This pull request fixes the failing test in
packages/wrapped-keys/src/lib/api/utils.spec.ts
, which currently expects an array of access control conditions. However, the actual implementation ofgetPkpAccessControlCondition
returns a singleAccsDefaultParams
object, as documented:To align with the function’s intended return type (a single ACC object), this PR updates the test
should correctly create the ACC
to check for an object instead of an array.Related Issue:
Type of change
How Has This Been Tested?
npx nx run wrapped-keys:test
locally after changing the test to expect a single object. All tests pass successfully now.❯ yarn nx format:check --all yarn run v1.22.22 $ /Users/susumu/js-sdk/node_modules/.bin/nx format:check --all [warn] jsxBracketSameLine is deprecated. ✨ Done in 7.55s.
Checklist:
Note: If in the future we decide that an array of ACCs is actually required for broader usage, we can revisit and update both the implementation and the docstring. For now, this PR ensures the test is consistent with the current single-object return.