Initial commit

This commit is contained in:
Tom Lerendu 2021-06-16 14:09:26 +01:00
commit 7878e653a0
253 changed files with 24552 additions and 0 deletions

View file

@ -0,0 +1,15 @@
import React from 'react';
import { mount } from '../../../tests/enzyme';
import TextLimit from './TextLimit';
describe('Text Limit', () => {
it('doesnt cut text until it exceeds the character limit', () => {
const wrapper = mount(<TextLimit characters={4}>Text</TextLimit>);
expect(wrapper.text()).toEqual('Text');
});
it('cuts off text that exceeds the character limit', () => {
const wrapper = mount(<TextLimit characters={6}>Longer text</TextLimit>);
expect(wrapper.text()).toEqual('Longer…');
});
});