-
Notifications
You must be signed in to change notification settings - Fork 3
#343 feat(domain) Aggregation Resilience #345
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
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5f79ffc
#343 Resillience code plus test
johnmasking 88efc64
#343 proces review comment
johnmasking c199416
#343 correct fixtures
johnmasking b54f346
#343 attempt to satisfy review comment
johnmasking 4290d62
#343 correct testname/comments
johnmasking 9966a04
#343 set meaningful comment
johnmasking File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -15,29 +15,45 @@ beforeEach(async () => | |||||
|
||||||
describe('domain/notification/getallAggregated', () => | ||||||
{ | ||||||
it('should give all posts for the requester', async () => | ||||||
it('should give all notifications for the requester2', async () => | ||||||
{ | ||||||
const result = await getRecentAggregated(REQUESTERS.CREATOR1, { offset: 0, limit: 7 }); | ||||||
const result = await getRecentAggregated(REQUESTERS.CREATOR2, { offset: 0, limit: 7 }); | ||||||
|
||||||
expect(result).toHaveLength(3); | ||||||
expect(result).toHaveLength(2); | ||||||
|
||||||
const notification1 = result[0]; | ||||||
const notification2 = result[1]; | ||||||
const notification3 = result[2]; | ||||||
|
||||||
expect(notification1.type).toBe(Types.STARTED_FOLLOWING); | ||||||
expect(notification1.post).toBe(undefined); | ||||||
expect(notification1.reaction).toBe(undefined); | ||||||
expect(notification1.relation.following.id).toBe(VALUES.IDS.CREATOR2); | ||||||
expect(notification1.relation.following.id).toBe(VALUES.IDS.CREATOR1); | ||||||
|
||||||
expect(notification2.type).toBe(Types.RATED_POST); | ||||||
expect(notification2.post?.id).toBe(VALUES.IDS.POST_RATED); | ||||||
expect(notification2.reaction).toBe(undefined); | ||||||
expect(notification2.relation.following.id).toBe(VALUES.IDS.CREATOR3); | ||||||
|
||||||
expect(notification3.type).toBe(Types.RATED_REACTION); | ||||||
expect(notification3.post).toBe(undefined); | ||||||
expect(notification3.reaction?.id).toBe(VALUES.IDS.REACTION_LIKED); | ||||||
expect(notification3.relation.following.id).toBe(VALUES.IDS.CREATOR2); | ||||||
}); | ||||||
|
||||||
it('should give only the notifications without aggregation errors for requester1', async () => | ||||||
|
it('should give only the notifications without aggregation errors for requester1', async () => | |
it('should filter out deleted notifications without aggregation errors', async () => |
The specific requester doesn't matter because it's fixture related, and is not a part of what we're testing.
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.
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.
The specific requester doesn't matter because it's fixture related, and is not a part of what we're testing.