MCPcopy Index your code
hub / github.com/codeaashu/claude-code / testAnalyticsSink

Function testAnalyticsSink

scripts/test-services.ts:60–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58}
59
60async function testAnalyticsSink() {
61 console.log('\n--- Analytics Sink ---')
62 try {
63 const analytics = await import('../src/services/analytics/index.js')
64
65 // logEvent should queue without crashing when no sink is attached
66 analytics.logEvent('test_event', { test_key: 1 })
67 pass('logEvent (no sink)', 'queues without crash')
68
69 await analytics.logEventAsync('test_async_event', { test_key: 2 })
70 pass('logEventAsync (no sink)', 'queues without crash')
71 } catch (err: any) {
72 fail('Analytics sink', err.message)
73 }
74}
75
76async function testPolicyLimits() {
77 console.log('\n--- Policy Limits ---')

Callers 1

mainFunction · 0.85

Calls 2

passFunction · 0.85
failFunction · 0.85

Tested by

no test coverage detected