Skip to content

Instantly share code, notes, and snippets.

@sonicoder86
Created July 22, 2020 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sonicoder86/314a539db91545f2bbb824efe03f809d to your computer and use it in GitHub Desktop.
Save sonicoder86/314a539db91545f2bbb824efe03f809d to your computer and use it in GitHub Desktop.
Svelte Testing Crash Course - part 11
import { render } from '@testing-library/svelte';
import Routing from './routing.svelte';
describe('Routing', () => {
it('should render routing', () => {
const { getByTestId } = render(Routing);
const element = getByTestId('info');
expect(element).toHaveTextContent('Click to modify');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment