<commit_before><commit_msg>Added tests for the Typograpgy component<commit_after>import React from 'react';
import test from 'ava';

import { mount } from '../../../tests/helpers/enzyme';
import Typography from './typography';

test('should render a span with the class of typography', (t) => {
  const wrapper = mount(<Typography typography="body1">Typo</Typography>);

  t.deepEqual(wrapper.find('span.typography').length, 1);
});

test('should add a class of typography--secondary when the secondary prop is passed', (t) => {
  const wrapper = mount(
    <Typography
      secondary
      typography="body1"
    >
      Typo
    </Typography>,
  );

  t.deepEqual(wrapper.find('.typography--secondary').length, 1);
});

{'fraction_non_alphanumeric': 0.1523545706371191, 'fraction_numerical': 0.00554016620498615, 'mean_word_length': 3.986206896551724, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5991363', 'n_tokens_mistral': 217, 'n_tokens_neox': 212, 'n_words': 60}