pull/82/head
Steve Ruiz 2021-09-08 12:55:42 +01:00
rodzic 7489ee8174
commit 21c42cbe12
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -6,4 +6,14 @@ describe('tldraw', () => {
test('mounts component without crashing', () => {
render(<TLDraw />)
})
test('mounts component and calls onMount', (done) => {
const onMount = jest.fn()
render(<TLDraw onMount={onMount} />)
// The call is asynchronous: it won't be called until the next tick.
setTimeout(() => {
expect(onMount).toHaveBeenCalled()
done()
}, 100)
})
})