Complete the code to import the render function from Testing Library.
import { [1] } from '@testing-library/svelte';
The render function is used to render Svelte components in tests.
Complete the code to render the Button component in the test.
const { getByText } = [1](Button);The render function renders the component and returns helpers like getByText.
Fix the error in the assertion to check if the button text is 'Click me'.
expect(getByText([1])).toBeInTheDocument();The exact text in the button is 'Click me', so the assertion must use this exact string.
Fill both blanks to import and use the fireEvent to simulate a click.
import { render, [1] } from '@testing-library/svelte'; fireEvent.[2](button);
You import fireEvent to simulate user events, and use fireEvent.click to simulate a click.
Fill all three blanks to test if a callback is called when the button is clicked.
const handleClick = jest.fn();
const { getByText } = [1](Button, { props: { onClick: [2] } });
fireEvent.click(getByText([3]));
expect(handleClick).toHaveBeenCalled();You render the component with the handleClick function as a prop, then simulate a click on the button with text 'Click me'.