test: 492 tests, 78% line coverage

- Device domain: updateFromValues, organizeParameters, identifier
- BaseModel: full CRUD mock tests
- DeviceModel: all methods mocked
- Other models: collectionName verification
- MainStateMachine: start, handleResponse, state transitions
- ConfigurationEvaluationState: init, GPN flow, GPN-unsupported skip
- MongodbProvider: getMongoDb guard
- device_utils: hash determinism
- vitest.config.ts: coverage scope (excludes HTTP layer)
- 492 tests passing, 78% line coverage
This commit is contained in:
Kevin L'Hereec committed 2026-06-02 16:45:19 +02:00
1 parent ab21f11b30
commit 12a1787151
10 files changed
+710 -3

No files matched your search

@@ -101,9 +101,9 @@ describe('BaseModel (integration)', () => {
it('updateMany modifies multiple documents', async () => {
const col = db.collection('test_base')
await col.deleteMany({}) // explicit clean
await col.insertMany([{ status: 'old' }, { status: 'old' }, { status: 'keep' }])
const result = await col.updateMany({ status: 'old' }, { $set: { status: 'new' } })
await col.deleteMany({})
await col.insertMany([{ status2: 'old' }, { status2: 'old' }, { status2: 'keep' }])
const result = await col.updateMany({ status2: 'old' }, { $set: { status2: 'new' } })
expect(result.modifiedCount).toBe(2)
})