Skip to content

test: Condition tests for web-crypto-backend #171

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

Merged
merged 2 commits into from
Aug 3, 2019

Conversation

seebees
Copy link
Contributor

@seebees seebees commented Jul 30, 2019

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

@seebees seebees requested a review from a team July 30, 2019 00:42
})

it('Precondition: A backend must be passed to get a non zero byte backend.', () => {
expect(() => getNonZeroByteBackend(false)).to.throw('No supported backend.')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a convenient way to make the meaning of the false more intuitive to the reader (e.g. by naming it, or adding a comment for what it does)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum... These functions operate on backends returned. I can add a comment. But the idea is that if a backend does not exist, I return false to be explicit. These helper functions are just handling that...

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We chatted about this offline and I can't think of a non-confusing way to express what I want here, so I would say let's just leave it.

})

it('Precondition: A backend must be passed to get a zero byte backend.', () => {
expect(() => getZeroByteSubtle(false)).to.throw('No supported backend.')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

@seebees seebees merged commit 796af98 into aws:master Aug 3, 2019
@seebees seebees deleted the conditions-web-crypto-backend branch August 3, 2019 00:15
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