Add validity middleware mock and tests#631
Merged
nicknisi merged 3 commits intodojo:masterfrom Jan 6, 2020
Merged
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 8592d3c:
|
matt-gadd
reviewed
Jan 6, 2020
| invalidate = invalidator; | ||
| return { | ||
| get(key: string | number, value: string) { | ||
| value; |
Contributor
There was a problem hiding this comment.
is this meant to be here?
Member
Author
There was a problem hiding this comment.
Oops, no I meant to remove that. I originally added it because value is unused and I was quieting TypeScript. Renaming the argument to _value to quiet TypeScript instead.
matt-gadd
approved these changes
Jan 6, 2020
Instead of mocking the whole middleware, node node middleware is mocked and the mock function returns an object representing the node with the properties to look at for validation.
4a99f62 to
8592d3c
Compare
matt-gadd
approved these changes
Jan 6, 2020
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.
Type: feature
The following has been addressed in the PR:
prettieras per the readme code style guidelinesDescription:
This adds a validity middleware mock and tests for it.
Resolves #630