Fix the test - "Model operations - unshare() and delete() test".
The root cause failure is because there are two keys matching the regex, but the test expects only one key.
The following expects only one shared key which is sharedWith ce2e2 - expect(await fourthPhone.sharedWith(), ['@ce2e2']); ; but the "getKeys" returns two shared keys (please refer to the screenshot attached) and the test fails with the below error.
Expected: ['@ce2e2'] Actual: ['@ce2e2', '@ce2e2'] Which: at location [1] is ['@ce2e2', '@ce2e2'] which longer than expected
The keys "ce2e2:123-personal-phone.phone.atcollectionmodel.buzz.wavi@ce2e1" and "ce2e2:personal-phone.phone.atcollectionmodel.buzz.wavi@ce2e1" are two shared keys returned.
Fixes https://github.com/atsign-foundation/at_client_sdk/issues/1267
- What I did
Fix the test - "Model operations - unshare() and delete() test".
The root cause failure is because there are two keys matching the regex, but the test expects only one key.
The following expects only one shared key which is sharedWith ce2e2 -
expect(await fourthPhone.sharedWith(), ['@ce2e2']);
; but the "getKeys" returns two shared keys (please refer to the screenshot attached) and the test fails with the below error.Expected: ['@ce2e2'] Actual: ['@ce2e2', '@ce2e2'] Which: at location [1] is ['@ce2e2', '@ce2e2'] which longer than expected
The keys "ce2e2:123-personal-phone.phone.atcollectionmodel.buzz.wavi@ce2e1" and "ce2e2:personal-phone.phone.atcollectionmodel.buzz.wavi@ce2e1" are two shared keys returned.