Change .hydrate() test to check dom elements.
This commit is contained in:
@@ -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)
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user