examples/storefront Public
// A Queue producer stand-in that keeps what was sent.export class TestQueue<T> { readonly sent: T[] = []; async send(body: T): Promise<void> { this.sent.push(body); } async sendBatch(messages: Iterable<{ body: T }>): Promise<void> { for (const m of messages) this.sent.push(m.body); }}export function testQueue<T>(): Queue<T> & TestQueue<T> { return new TestQueue<T>() as unknown as Queue<T> & TestQueue<T>;}