component.test.mst 773 B

12345678910111213141516171819202122232425
  1. // TODO Move this file to the client/tests/components directory.
  2. import React from 'react';
  3. import { expect } from 'chai';
  4. import { shallow, mount, render } from 'enzyme';
  5. import '../stubs';
  6. import {{ name }} from '../../src/components/{{ slug }}/{{ name }}';
  7. describe('{{ name }}', () => {
  8. it('exists', () => {
  9. expect({{ name }}).to.exist;
  10. });
  11. it('contains spec with an expectation', () => {
  12. expect(shallow(<{{ name }} />).contains(<div className="c-{{ slug }}" />)).to.equal(true);
  13. });
  14. it('contains spec with an expectation', () => {
  15. expect(shallow(<{{ name }} />).is('.c-{{ slug }}')).to.equal(true);
  16. });
  17. it('contains spec with an expectation', () => {
  18. expect(mount(<{{ name }} />).find('.c-{{ slug }}').length).to.equal(1);
  19. });
  20. });