@@ -1,4 +1,4 @@
|
||||
import { compileStyle } from '../src'
|
||||
import { compileStyle, parse } from '../src'
|
||||
import { mockId, compileSFCScript, assertCode } from './utils'
|
||||
|
||||
describe('CSS vars injection', () => {
|
||||
@@ -231,5 +231,21 @@ describe('CSS vars injection', () => {
|
||||
})`)
|
||||
assertCode(content)
|
||||
})
|
||||
|
||||
// #6022
|
||||
test('should be able to parse incomplete expressions', () => {
|
||||
const {
|
||||
descriptor: { cssVars }
|
||||
} = parse(
|
||||
`<script setup>let xxx = 1</script>
|
||||
<style scoped>
|
||||
label {
|
||||
font-weight: v-bind("count.toString(");
|
||||
font-weight: v-bind(xxx);
|
||||
}
|
||||
</style>`
|
||||
)
|
||||
expect(cssVars).toMatchObject([`count.toString(`, `xxx`])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user