Skip to content

Commit

Permalink
chore: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 9, 2022
1 parent f0be678 commit 9ade65b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/transformer-variant-group.test.ts
Expand Up @@ -31,15 +31,21 @@ describe('transformer-variant-group', () => {
}
})

test('vue file', async () => {
test('vue file with strict sep', async () => {
async function transform(code: string) {
const s = new MagicString(code)
expandVariantGroup(s, [':'])
return s.toString()
}

const file = await readFile('./test/assets/variant-group.vue', 'utf-8')
const result = await transform(file)
expect(result).toMatchInlineSnapshot(`
"<script setup lang=\\"ts\\">
const a = 1
const b = 2
// eslint-disable-next-line @typescript-eslint/space-infix-ops
const c = a-b a--a a--b
const c = a-(b -a -b)
</script>
<template>
Expand Down

0 comments on commit 9ade65b

Please sign in to comment.