MCPcopy Create free account
hub / github.com/block/buzz / createMockEvent

Function createMockEvent

desktop/src/testing/e2eBridge.ts:4310–4327  ·  view source on GitHub ↗
(
  kind: number,
  content: string,
  tags: string[][],
  pubkey = DEFAULT_MOCK_IDENTITY.pubkey,
  createdAt = Math.floor(Date.now() / 1000),
  id = crypto.randomUUID().replace(/-/g, ""),
)

Source from the content-addressed store, hash-verified

4308}
4309
4310function createMockEvent(
4311 kind: number,
4312 content: string,
4313 tags: string[][],
4314 pubkey = DEFAULT_MOCK_IDENTITY.pubkey,
4315 createdAt = Math.floor(Date.now() / 1000),
4316 id = crypto.randomUUID().replace(/-/g, ""),
4317): RelayEvent {
4318 return {
4319 id,
4320 pubkey,
4321 created_at: createdAt,
4322 kind,
4323 tags,
4324 content,
4325 sig: "mocksig".repeat(20).slice(0, 128),
4326 };
4327}
4328
4329async function signWithIdentity(
4330 identity: TestIdentity,

Callers 12

prependMockHistoryFunction · 0.85
emitMockChannelMessageFunction · 0.85
buildMockProjectEventsFunction · 0.85
handleSendChannelMessageFunction · 0.85
handleEditMessageFunction · 0.85
handleAddReactionFunction · 0.85
handleRemoveReactionFunction · 0.85
handleMockCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected