hongbo-miao/hongbomiao.com

View on GitHub
web/src/App/components/SocialList.test.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import { render } from '@testing-library/react';
import React from 'react';
import WEBSITES from '../../Home/fixtures/WEBSITES';
import HmSocialList from './SocialList';

describe('SocialList', () => {
  const component = <HmSocialList websites={WEBSITES} />;

  test('render SocialList', () => {
    render(component);
  });

  test('render .level-item', () => {
    const { container } = render(component);
    // eslint-disable-next-line testing-library/no-container,testing-library/no-node-access
    expect(container.getElementsByTagName('img')).toHaveLength(WEBSITES.length);
  });
});