Skip to content

Commit 6f57f4e

Browse files
committed
Remove unrelated test – we need to add a cleaner way to test unmount
1 parent a09baf4 commit 6f57f4e

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
@@ -37,20 +37,3 @@ test('updates component state', async () => {
3737
// content has changed.
3838
expect(elapsedTime).toHaveTextContent(timeBeforeStop)
3939
})
40-
41-
test('unmounts a component', async () => {
42-
jest.spyOn(console, 'error').mockImplementation(() => {})
43-
44-
const {unmount, isUnmounted, getByText} = render(StopWatch)
45-
await fireEvent.click(getByText('Start'))
46-
47-
// Destroys a Vue component instance.
48-
unmount()
49-
50-
expect(isUnmounted()).toBe(true)
51-
52-
// Wait for a few milliseconds
53-
await sleep(5)
54-
55-
expect(console.error).not.toHaveBeenCalled()
56-
})

0 commit comments

Comments
 (0)