Queued-message test: ask Stop again when it answers still stopping

This commit is contained in:
Niko1221 committed 2026-10-16 20:06:04 +02:00
1 parent 0b871e2d79
commit 5e7a965ac1
1 file changed
+2 -1
+2 -1
View File
@@ -102,7 +102,8 @@ test('a message typed while a goal without points runs is queued, can be taken b
const back = r.bridge.cancelQueued({ chatId: 'q1', id: b.message.id });
assert.deepEqual(back.queue.map(m => m.text), ['first thing']);
assert.throws(() => r.bridge.cancelQueued({ chatId: 'q1', id: b.message.id }), /already sent or removed/);
await r.bridge.stop('q1');
// Stop may answer 'still stopping' on a busy machine: ask again until the run has ended
for (let i = 0; i < 5; i++) { const st = await r.bridge.stop('q1'); if (st.stopped || !r.bridge.isRunning('q1')) break; }
await run;
const rel = out.find(f => f.type === 'queued-release');
assert.deepEqual(rel.messages.map(m => m.text), ['first thing']);