Skip to content

Commit c5ec238

Browse files
committed
update parallel variants tests to make use of new API
1 parent e936a00 commit c5ec238

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

tests/parallel-variants.test.js

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { transformAllSelectors, updateAllClasses } from '../src/util/pluginUtils.js'
2-
31
import { run, html, css } from './util/run'
42

53
test('basic parallel variants', async () => {
@@ -12,21 +10,8 @@ test('basic parallel variants', async () => {
1210
},
1311
],
1412
plugins: [
15-
function test({ addVariant, config }) {
16-
addVariant('test', [
17-
transformAllSelectors((selector) => {
18-
let variantSelector = updateAllClasses(selector, (className) => {
19-
return `test${config('separator')}${className}`
20-
})
21-
22-
return `${variantSelector} *::test`
23-
}),
24-
transformAllSelectors((selector) => {
25-
return updateAllClasses(selector, (className, { withPseudo }) => {
26-
return withPseudo(`test${config('separator')}${className}`, '::test')
27-
})
28-
}),
29-
])
13+
function test({ addVariant }) {
14+
addVariant('test', ['& *::test', '&::test'])
3015
},
3116
],
3217
}

0 commit comments

Comments
 (0)