Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: Marcos Moreira
Added: Oct 9, 2020 1:17 PM
Views: 13
Tags: no tags
  1. import React from 'react';
  2. import { Name } from '../index';
  3. import renderer from 'react-test-renderer';
  4. import { TName } from './types';
  5. import data from './mock.json';
  6. const mock: TName = data;
  7.  
  8. it('renders correctly', () => {
  9.   const tree = renderer.create(<Name {...mock} />).toJSON();
  10.   expect(tree).toMatchSnapshot();
  11. });