mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-25 20:21:46 +08:00
14 lines
299 B
TypeScript
14 lines
299 B
TypeScript
import cheerio from 'cheerio';
|
|
import fetch from 'node-fetch';
|
|
|
|
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');
|
|
});
|