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',
}
});
const obj = form.toObject();
expect(obj).toMatchObject({
name: 'Jaws',
genre: 'horror',
rating: {
score: 5,
type: 'critic',
}
})
expect(getInputValue('name')).toBe('Jaws')
expect(getInputValue('genre')).toBe('horror')
expect(getInputValue('rating-score')).toBe('5');
expect(document.getElementById('rating-type-critic')?.hasAttribute('checked')).toBe(true)
})
});