MCPcopy Create free account
hub / github.com/cameri/nostream / stubInvoice

Function stubInvoice

test/unit/services/payments-service.spec.ts:26–39  ·  view source on GitHub ↗
(overrides: Partial<Invoice> = {})

Source from the content-addressed store, hash-verified

24 let settings: Sinon.SinonStub
25
26 const stubInvoice = (overrides: Partial<Invoice> = {}): Invoice => ({
27 id: 'invoice-id',
28 pubkey: 'pubkey1234',
29 bolt11: 'lnbc500n1...',
30 amountRequested: 1000n,
31 unit: InvoiceUnit.SATS,
32 status: InvoiceStatus.PENDING,
33 description: 'test invoice',
34 confirmedAt: null,
35 expiresAt: new Date('2099-01-01'),
36 updatedAt: new Date(),
37 createdAt: new Date(),
38 ...overrides,
39 })
40
41 beforeEach(() => {
42 sandbox = Sinon.createSandbox()

Callers 2

makeCompletedInvoiceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected