Finanzen: Index auf bankTransactions.status, Vormerkungssuche mit Rueckfall
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
588cc95f5d
commit
75ca8b78c0
4 files changed
+41
-3
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { test } from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { schemaKeys } from './support/schema.js'
|
||||
|
||||
test('bankTransactions: Attribute der Spec sind im Setup-Skript angelegt', () => {
|
||||
@@ -28,3 +29,11 @@ test('subscriptions wird weiter aus dem Abo-Setup gelesen', () => {
|
||||
test('unbekannte Collection scheitert mit klarer Meldung', () => {
|
||||
assert.throws(() => schemaKeys('gibtEsNicht'), /Collection gibtEsNicht fehlt im Setup-Skript/)
|
||||
})
|
||||
|
||||
test('bankTransactions: Indexe auf bookingDate (Sortierung) und status (Vormerkungen suchen)', () => {
|
||||
const src = readFileSync(new URL('../scripts/setup-finanzen.mjs', import.meta.url), 'utf8')
|
||||
const start = src.indexOf("'bankTransactions',")
|
||||
const block = src.slice(start, src.indexOf("// Einstellungen", start))
|
||||
assert.match(block, /key: 'idx_booking', type: 'key', attributes: \['bookingDate'\]/)
|
||||
assert.match(block, /key: 'idx_status', type: 'key', attributes: \['status'\]/)
|
||||
})
|
||||
Reference in new issue
Block a user