(html)
| 23 | } |
| 24 | |
| 25 | function getData(html) { |
| 26 | const $ = cheerio.load(html) |
| 27 | const nextData = $('#__NEXT_DATA__') |
| 28 | const preEl = $('#props-pre') |
| 29 | const routerData = JSON.parse($('#router').text()) |
| 30 | return { |
| 31 | nextData: JSON.parse(nextData.html()), |
| 32 | pre: preEl.text(), |
| 33 | routerData, |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | function runTests(startServer = nextStart) { |
| 38 | it('should compile successfully', async () => { |