-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: breaking changes #642
Conversation
# Conflicts: # packages/testing/package.json # yarn.lock
5a0c8d6
to
a2628f2
Compare
# Conflicts: # packages/testing/package.json # yarn.lock
@@ -80,14 +80,16 @@ describe('Breaking Changes', () => { | |||
expect(did.uri).toMatchInlineSnapshot( | |||
`"did:kilt:light:004quk8nu1MLvzdoT4fE6SJsLS4fFpyvuGz7sQpMF7ZAWTDoF5:z1msTRicERqs59nwMvp3yzMRBhUYGmkum7ehY7rtKQc8HzfEx4b4eyRhrc37ZShT3oG7E89x89vaG9W4hRxPS23EAFnCSeVbVRrKGJmFQvYhjgKSMmrGC7gSxgHe1a3g41uamhD49AEi13YVMkgeHpyEQJBy7N7gGyW7jTWFcwzAnws4wSazBVG1qHmVJrhmusoJoTfKTPKXkExKyur8Z341EkcRkHteY8dV3VjLXHnfhRW2yU9oM2cRm5ozgaufxrXsQBx33ygTW2wvrfzzXsYw4Bs6Vf2tC3ipBTDcKyCk6G88LYnzBosRM15W3KmDRciJ2iPjqiQkhYm77EQyaw"` | |||
) | |||
|
|||
expect(Did.parseDocumentFromLightDid(did.uri)).toMatchSnapshot() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my idea was to use a hard-coded did here to make sure that even if we update the snapshot above bc we change the way dids are encoded, we still make sure we can decode the original form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we can do that
resolveKey: makeResolveKey(aliceDid), | ||
}) | ||
|
||
expect(decrypted).toMatchSnapshot() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it be better to compare against message
to make sure they are the same instead of making a second snapshot which you'd have to compare manually to the first?
expect(decrypted).toMatchSnapshot() | |
expect(decrypted).toMatchObject(message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's merge this as-is
fixes KILTProtocol/ticket#2081
Assert persistence of the following
How to test:
Please provide a brief step-by-step instruction.
If necessary, provide information about dependencies (specific configuration, branches, database dumps, etc.)
Checklist: