xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

TypeScript & React & Jest

create-react-app

Jest

``tsx
import React from 'react';
import { render } from '@testing-library/react';
import App from './index';

test('renders learn react link', () => {
const { getByText } = render();
// const linkElement = getByText(/react & typeScript/i);
const linkElement = getByText(/react & typeScript/i);
// const linkElement = getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});


## refs




***

<div>
  <a href="https://info.flagcounter.com/QIXi">
    <img src="https://s11.flagcounter.com/count2/QIXi/bg_000000/txt_00FF00/border_FF00FF/columns_3/maxflags_12/viewers_0/labels_1/pageviews_1/flags_0/percent_1/" alt="Flag Counter" border="0">
  </a>
</div>


***

<blockquote style="display: flex; flex-flow: column; align-items: center; justify-content: center; text-align: center; border: none;">
  <h3><strong><span style="font-size: 16pt; color: #00ff00;">&copyxgqfrms 2012-<span data-uid="copyright-aside">2020</span></strong></span</h3>
  <p><span style="font-size: 18pt; color: #00ff00;"><strong>www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!</strong></span></p>
</blockquote>

***
原文地址:https://www.cnblogs.com/xgqfrms/p/13554874.html