index.spec.js 602 B

1234567891011121314151617181920212223242526272829303132
  1. import Info from '..';
  2. import { mount } from '../../../test/utils';
  3. test('should not render when info is empty string', () => {
  4. const wrapper = mount(Info, {
  5. propsData: {
  6. info: ''
  7. }
  8. });
  9. expect(wrapper).toMatchSnapshot();
  10. });
  11. test('should not render when info is empty undefined', () => {
  12. const wrapper = mount(Info, {
  13. propsData: {
  14. info: undefined
  15. }
  16. });
  17. expect(wrapper).toMatchSnapshot();
  18. });
  19. test('should render when info is zero', () => {
  20. const wrapper = mount(Info, {
  21. propsData: {
  22. info: 0
  23. }
  24. });
  25. expect(wrapper).toMatchSnapshot();
  26. });