mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-03-25 18:30:24 +00:00
21 lines
493 B
JavaScript
21 lines
493 B
JavaScript
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import Icon from './Icon';
|
|
|
|
describe('Icon', () => {
|
|
it('exists', () => {
|
|
expect(Icon).toBeDefined();
|
|
});
|
|
|
|
it('#name', () => {
|
|
expect(shallow(<Icon name="test" />)).toMatchSnapshot();
|
|
});
|
|
|
|
it('#className', () => {
|
|
expect(shallow(<Icon name="test" className="u-test" />)).toMatchSnapshot();
|
|
});
|
|
|
|
it('#title', () => {
|
|
expect(shallow(<Icon name="test" title="Test title" />)).toMatchSnapshot();
|
|
});
|
|
});
|