Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Check that a missing file is not retried, not how long it took

Fei24118b674924294d
diff --git a/ds-bot/test/files.test.js b/ds-bot/test/files.test.js
index 4cf280c0..3ee7601d 100644
--- a/ds-bot/test/files.test.js
+++ b/ds-bot/test/files.test.js
@@ -39,7 +39,7 @@ test('stops trying when the check before a new try throws, and leaves the file a
test('gives up at once on an error that waiting does not fix', async (t) => {
const dir = folder(t)
- const started = Date.now()
+ const wait = t.mock.method(globalThis, 'setTimeout')
await assert.rejects(replaceFile(join(dir, 'missing.tmp'), join(dir, 'state.json')), { code: 'ENOENT' })
- assert.ok(Date.now() - started < 40)
+ assert.equal(wait.mock.callCount(), 0)
})