Change .hydrate() test to check dom elements.

This commit is contained in:
Austin Smith
2025-10-20 18:51:13 -04:00
parent a3c34de3d2
commit 0d9b4b6b22

View File

@@ -67,15 +67,10 @@ describe('Declaform', () => {
type: 'critic', type: 'critic',
} }
}); });
const obj = form.toObject(); expect(getInputValue('name')).toBe('Jaws')
expect(obj).toMatchObject({ expect(getInputValue('genre')).toBe('horror')
name: 'Jaws', expect(getInputValue('rating-score')).toBe('5');
genre: 'horror', expect(document.getElementById('rating-type-critic')?.hasAttribute('checked')).toBe(true)
rating: {
score: 5,
type: 'critic',
}
})
}) })
}); });