...
Code Block | ||
---|---|---|
| ||
expect(screen.getByText(/My hovercraft is full of eels/i)).toBeInTheDocument(); expect(screen.getByRole('button', { name: /add_potato/ })).toBeDisabled(); |
...
Expecting that an event is emitted
Code Block | ||
---|---|---|
| ||
const view = render(MyComponent); await fireEvent.click(view.getByRole('button', { name: /remove_potato/ })); expect(view.emitted('do_thing')).toEqual([[123]]); |
...