Push-Zeitmail: Review-Fixes (Rate-Limit begrenzt, kein NaN-Datum, Störung ≠ gelöscht)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7d4767a137
commit
6643283c6f
4 files changed
+104
-21
No files matched your search
@@ -17,6 +17,7 @@ before(async () => {
|
||||
openGit('ws1'),
|
||||
openGit('ws-race'),
|
||||
{ $id: 'remote1', serviceType: 'Remote', startTime: '', totalTime: 0 },
|
||||
{ ...openGit('broken'), endDate: '', endTime: 'xx' },
|
||||
],
|
||||
},
|
||||
})
|
||||
@@ -72,3 +73,17 @@ test('gleichzeitig: nur einer speichert', async () => {
|
||||
const results = await Promise.all([applyPushTime('ws-race', 30), applyPushTime('ws-race', 90)])
|
||||
assert.deepEqual(results.map((r) => r.status).sort(), ['already', 'saved'])
|
||||
})
|
||||
|
||||
test('kaputtes Push-Datum: nichts speichern (Review-Fix)', async () => {
|
||||
assert.equal(startFromEnd('', '', 30), null)
|
||||
assert.equal(startFromEnd('30.09.2026', '16:46', 30), null)
|
||||
assert.equal(startFromEnd('31.02.2026', '1646', 30), null)
|
||||
assert.equal((await applyPushTime('broken', 30)).status, 'invalid')
|
||||
const ws = fake.get('worksheets', 'broken')
|
||||
assert.deepEqual([ws.startTime, ws.totalTime, ws.isComment], ['', 0, true])
|
||||
})
|
||||
|
||||
test('Appwrite-Störung ist nicht „missing“ (Review-Fix)', async () => {
|
||||
fake.failNext({ method: 'GET', pathIncludes: '/documents/ws-race', status: 500 })
|
||||
await assert.rejects(applyPushTime('ws-race', 30))
|
||||
})
|
||||
Reference in new issue
Block a user