mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-29 09:08:41 +08:00
<img width="740" alt="Screen Shot 2020-05-20 at 16 31 30" src="https://user-images.githubusercontent.com/1174278/82458770-673d8880-9ab7-11ea-81d3-8ac0c1e52705.png">
14 lines
299 B
TypeScript
14 lines
299 B
TypeScript
import fetch from 'node-fetch';
|
|
import cheerio from 'cheerio';
|
|
|
|
const server = 'http://localhost:3275';
|
|
|
|
it('renders the home page', async () => {
|
|
const res = await fetch(server);
|
|
const html = await res.text();
|
|
|
|
const $ = cheerio.load(html);
|
|
|
|
expect($('title').text()).toBe('Examples');
|
|
});
|