(html: string)
| 26 | |
| 27 | test('check homepage css', async () => { |
| 28 | const getStyles = (html: string) => { |
| 29 | const searchText = '<style>/*! tailwindcss' |
| 30 | const _styles = html.slice(html.indexOf(searchText) + '<style>'.length) |
| 31 | return _styles.slice(0, _styles.indexOf('</style>')) |
| 32 | } |
| 33 | |
| 34 | const builtHtml = readFileSync(`${fixturePath}.output/public/index.html`, 'utf-8') |
| 35 | const builtStyles = getStyles(builtHtml) |