-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into BC-5424-tldraw-persistent-storage
- Loading branch information
Showing
80 changed files
with
1,318 additions
and
611 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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
24 changes: 15 additions & 9 deletions
24
apps/server/src/modules/deletion/builder/deletion-log-statistic.builder.spec.ts
This file contains 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 |
---|---|---|
@@ -1,22 +1,28 @@ | ||
import { DomainModel } from '@shared/domain/types'; | ||
import { DomainName, OperationType } from '@shared/domain/types'; | ||
import { ObjectId } from 'bson'; | ||
import { DeletionLogStatisticBuilder } from '.'; | ||
|
||
describe(DeletionLogStatisticBuilder.name, () => { | ||
afterAll(() => { | ||
jest.clearAllMocks(); | ||
}); | ||
const setup = () => { | ||
const domain = DomainName.PSEUDONYMS; | ||
const operation = OperationType.DELETE; | ||
const count = 2; | ||
const refs = [new ObjectId().toHexString(), new ObjectId().toHexString()]; | ||
|
||
return { domain, operation, count, refs }; | ||
}; | ||
|
||
it('should build generic deletionLogStatistic with all attributes', () => { | ||
// Arrange | ||
const domain = DomainModel.PSEUDONYMS; | ||
const modifiedCount = 0; | ||
const deletedCount = 2; | ||
const { domain, operation, count, refs } = setup(); | ||
|
||
const result = DeletionLogStatisticBuilder.build(domain, modifiedCount, deletedCount); | ||
const result = DeletionLogStatisticBuilder.build(domain, operation, count, refs); | ||
|
||
// Assert | ||
expect(result.domain).toEqual(domain); | ||
expect(result.modifiedCount).toEqual(modifiedCount); | ||
expect(result.deletedCount).toEqual(deletedCount); | ||
expect(result.operation).toEqual(operation); | ||
expect(result.count).toEqual(count); | ||
expect(result.refs).toEqual(refs); | ||
}); | ||
}); |
12 changes: 3 additions & 9 deletions
12
apps/server/src/modules/deletion/builder/deletion-log-statistic.builder.ts
This file contains 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 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
4 changes: 2 additions & 2 deletions
4
apps/server/src/modules/deletion/builder/deletion-request-body-props.builder.ts
This file contains 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
Oops, something went wrong.