123456789101112131415161718192021222324252627 |
- /* eslint-disable import/no-extraneous-dependencies */
- /* eslint-disable no-undef */
- import React from 'react';
- import { render, cleanup } from '@testing-library/react';
- import '@testing-library/jest-dom';
- import Typography from '../components/Typography';
- describe('Typography component', () => {
- afterEach(cleanup);
- test('check title style', () => {
- const { getByText } = render(
- <Typography variant="title">title</Typography>
- );
- expect(getByText('title')).toHaveStyle('font-size: 16px;color: #000000;');
- });
- test('check subtitle style', () => {
- const { queryByText } = render(
- <Typography variant="subtitle">title</Typography>
- );
- expect(queryByText('title')).toHaveStyle('font-size: 14px;color: #000000;');
- });
- });
|