TypeScript & React & Jest
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;">©xgqfrms 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>
***
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/13554874.html
未经授权禁止转载,违者必究!