Skip to content

Commit 5e72319

Browse files
committed
Remove unrelated test – we need to add a cleaner way to test unmount
1 parent 849e039 commit 5e72319

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/__tests__/stopwatch.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,3 @@ test('updates component state', async () => {
3434
// content has changed.
3535
expect(elapsedTime).toHaveTextContent(timeBeforeStop)
3636
})
37-
38-
test('unmounts a component', async () => {
39-
jest.spyOn(console, 'error').mockImplementation(() => {})
40-
41-
const {unmount, isUnmounted, getByText} = render(StopWatch)
42-
await fireEvent.click(getByText('Start'))
43-
44-
// Destroys a Vue component instance.
45-
unmount()
46-
47-
expect(isUnmounted()).toBe(true)
48-
49-
// Wait for a few milliseconds
50-
await sleep(5)
51-
52-
expect(console.error).not.toHaveBeenCalled()
53-
})

0 commit comments

Comments
 (0)