Skip to content

Commit

Permalink
add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed Oct 11, 2023
1 parent 51ac627 commit 8503678
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/parse-candidate-strings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,5 +458,29 @@ describe.each([
expect(extractions).toContain('p-2')
expect(extractions).toContain('p-2.5')
})

it.each([
// With group name modifier
[
'<div class="bg-blue-300 group-[[data-can-play]:not([data-playing])]/parent:bg-red-300 p-4 w-60" ></div>',
[
'bg-blue-300',
'group-[[data-can-play]:not([data-playing])]/parent:bg-red-300',
'p-4',
'w-60',
],
],
// Without group name modifier
[
'<div class="bg-blue-300 group-[[data-can-play]:not([data-playing])]:bg-red-300 p-4 w-60">',
['bg-blue-300', 'group-[[data-can-play]:not([data-playing])]:bg-red-300', 'p-4', 'w-60'],
],
])('should work for issue #12169 (%#)', async (content, expectations) => {
let extractions = parse(content)

for (let value of expectations) {
expect(extractions).toContain(value)
}
})
})
})

0 comments on commit 8503678

Please sign in to comment.