blob: 53875dcae5b93af8307ff86c26f1e5e2795cf77e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import React from 'react';
import { render } from '@testing-library/react';
import OAuth2Button from "../../components/OAuth2Button";
test('renders oauth2 sign in button text', () => {
const { getByText } = render(<OAuth2Button />);
const button = getByText(/Sign in with Discord/i);
expect(button).toBeInTheDocument();
});
test("renders fontawesome discord icon", () => {
const { container } = render(<OAuth2Button/>);
const icon = container.querySelector(`[data-icon="discord"]`)
expect(icon).toBeInTheDocument();
})
|