similarScoreCard.spec.jsx 843 B

12345678910111213141516171819202122232425262728293031323334
  1. import React from 'react';
  2. import {shallow} from 'enzyme';
  3. import SimilarScoreCard from 'app/components/similarScoreCard';
  4. describe('SimilarScoreCard', function() {
  5. let sandbox;
  6. beforeEach(function() {
  7. sandbox = sinon.sandbox.create();
  8. });
  9. afterEach(function() {
  10. sandbox.restore();
  11. });
  12. it('renders', function() {
  13. let wrapper = shallow(<SimilarScoreCard />);
  14. expect(wrapper).toMatchSnapshot();
  15. });
  16. it('renders with score list', function() {
  17. let wrapper = shallow(
  18. <SimilarScoreCard
  19. scoreList={[
  20. ['exception,message,character-shingles', null],
  21. ['exception,stacktrace,application-chunks', 0.8],
  22. ['exception,stacktrace,pairs', 1],
  23. ['message,message,character-shingles', 0.5],
  24. ]}
  25. />
  26. );
  27. expect(wrapper).toMatchSnapshot();
  28. });
  29. });