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
289784a
commit 45aeafe
Showing
35 changed files
with
1,252 additions
and
225 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { getArbitrary } from 'fast-check-io-ts'; | ||
import { Supporter } from '../models/Supporter'; | ||
import * as t from 'io-ts'; | ||
|
||
const { creationTime, lastActivity, ...supporterProps } = Supporter.type.props; | ||
export const SupporterArb = getArbitrary( | ||
t.strict({ | ||
...supporterProps, | ||
}) | ||
).map((cc) => ({ | ||
...cc, | ||
creationTime: new Date(), | ||
lastActivity: new Date(), | ||
})); |
31 changes: 31 additions & 0 deletions
31
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,31 @@ | ||
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) => ({ | ||
...cc, | ||
})); | ||
|
||
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.