fix(fifty-shades-of-cold): fix test

- change querySelector for first test
This commit is contained in:
nprimo 2023-03-14 18:02:56 +00:00 committed by Niccolò Primo
parent 0df8148af8
commit 4df6305906
1 changed files with 7 additions and 4 deletions

View File

@ -13,10 +13,13 @@ export const tests = []
tests.push(async ({ page, eq }) => {
// check that the css is properly generated
const style = await page.$$eval('style', nodes => nodes[1].innerHTML)
const classes = style
.split('}')
.map(s => s.replace(/(\.|{|:|;|\s+)/g, ''))
const style = await page.$$eval('head style', nodes =>
nodes.map(n => n.innerText),
)
const classes = style[0]
.split('\n')
.map(s => s.replace(/(\.|{|:|;|\s+|})/g, ''))
.filter(Boolean)
.sort()