test(compiler-sfc): direct descendant wildcard rule selector (#13411)

add test case for #13387
This commit is contained in:
btea 2025-05-30 10:35:27 +08:00 committed by GitHub
parent a60f2bd371
commit 62f2aa11a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 0 deletions

View File

@ -39,6 +39,24 @@ describe('SFC scoped CSS', () => {
expect(compileScoped(`h1 .foo { color: red; }`)).toMatch(
`h1 .foo[data-v-test] { color: red;`,
)
// #13387
expect(
compileScoped(`main {
width: 100%;
> * {
max-width: 200px;
}
}`),
).toMatchInlineSnapshot(`
"main {
&[data-v-test] {
width: 100%;
}
> *[data-v-test] {
max-width: 200px;
}
}"`)
})
test('nesting selector', () => {