MCPcopy Create free account
hub / github.com/dfinity/orbit / collect

Function collect

cli/src/audit/resolver.spec.ts:69–75  ·  view source on GitHub ↗
(rule: RequestPolicyRule, named: NamedRule[] = [])

Source from the content-addressed store, hash-verified

67 beforeEach(() => resetCounter());
68
69 const collect = (rule: RequestPolicyRule, named: NamedRule[] = []) => {
70 const seen: Array<{ kind: string; minApproved: number; path: string }> = [];
71 walkQuorumRules(rule, namedMap(named), (kind, _approvers, minApproved, path) => {
72 seen.push({ kind, minApproved, path });
73 });
74 return seen;
75 };
76
77 it('visits Quorum with the configured min_approved', () => {
78 expect(collect({ Quorum: { approvers: { Any: null }, min_approved: 2 } })).toEqual([

Callers 1

resolver.spec.tsFile · 0.85

Calls 2

walkQuorumRulesFunction · 0.90
namedMapFunction · 0.85

Tested by

no test coverage detected