MCPcopy Create free account
hub / github.com/dailydotdev/apps / share

Function share

packages/shared/src/features/patchy/patchyIdle.spec.ts:4–11  ·  view source on GitHub ↗
(context: { isReading: boolean; isEvening: boolean })

Source from the content-addressed store, hash-verified

2
3const rolls = Array.from({ length: 200 }, (_, index) => index / 200);
4const share = (context: { isReading: boolean; isEvening: boolean }) => {
5 const counts: Record<string, number> = {};
6 rolls.forEach((roll) => {
7 const name = pickPatchyIdleAction(roll, context);
8 counts[name] = (counts[name] ?? 0) + 1;
9 });
10 return counts;
11};
12
13describe('pickPatchyIdleAction', () => {
14 it('mostly reads along while a post is open', () => {

Callers 3

onShareFunction · 0.85
patchyIdle.spec.tsFile · 0.85
useSlackShareFunction · 0.85

Calls 1

pickPatchyIdleActionFunction · 0.90

Tested by

no test coverage detected