mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-12 09:13:14 +00:00
25 lines
773 B
Text
25 lines
773 B
Text
// TODO Move this file to the client/tests/components directory.
|
|
import React from 'react';
|
|
import { expect } from 'chai';
|
|
import { shallow, mount, render } from 'enzyme';
|
|
import '../stubs';
|
|
|
|
import {{ name }} from '../../src/components/{{ slug }}/{{ name }}';
|
|
|
|
describe('{{ name }}', () => {
|
|
it('exists', () => {
|
|
expect({{ name }}).to.exist;
|
|
});
|
|
|
|
it('contains spec with an expectation', () => {
|
|
expect(shallow(<{{ name }} />).contains(<div className="c-{{ slug }}" />)).to.equal(true);
|
|
});
|
|
|
|
it('contains spec with an expectation', () => {
|
|
expect(shallow(<{{ name }} />).is('.c-{{ slug }}')).to.equal(true);
|
|
});
|
|
|
|
it('contains spec with an expectation', () => {
|
|
expect(mount(<{{ name }} />).find('.c-{{ slug }}').length).to.equal(1);
|
|
});
|
|
});
|