This repository has been archived by the owner on Aug 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(shared): added metadata logger box to extension
- Loading branch information
1 parent
7ca77e4
commit 5affd6a
Showing
18 changed files
with
895 additions
and
43 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
32 changes: 32 additions & 0 deletions
32
packages/shared/src/arbitraries/contributions/ContributionEvent.arb.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { getArbitrary } from 'fast-check-io-ts'; | ||
import { | ||
ADVContributionEvent, | ||
ContributionEvent, | ||
VideoContributionEvent, | ||
} from '../../models/ContributionEvent'; | ||
import * as t from 'io-ts'; | ||
import fc from 'fast-check'; | ||
|
||
const { ...videoContributionEventProps } = VideoContributionEvent.type.props; | ||
export const VideoContributionEventArb = getArbitrary( | ||
t.strict({ | ||
...videoContributionEventProps, | ||
}) | ||
).map((cc): any => ({ | ||
...cc, | ||
clientTime: new Date(), | ||
})); | ||
|
||
const { ...advContributionEventProps } = ADVContributionEvent.type.props; | ||
export const ADVContributionEventArb = getArbitrary( | ||
t.strict({ | ||
...advContributionEventProps, | ||
}) | ||
).map((cc) => ({ | ||
...cc, | ||
})); | ||
|
||
export const ContributionEventArb: fc.Arbitrary<ContributionEvent> = fc.oneof( | ||
VideoContributionEventArb, | ||
ADVContributionEventArb | ||
); |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.