chore: cleanup
This commit is contained in:
parent
ef452dfea6
commit
0b39d050b3
12
packages/cli/test/fixtures/transform-sfc/app.vue
vendored
12
packages/cli/test/fixtures/transform-sfc/app.vue
vendored
|
|
@ -1,12 +0,0 @@
|
||||||
<script lang="ts" setup>
|
|
||||||
const array: (number | string)[] = [1, 2, 3]
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div v-bind="{ array }">
|
|
||||||
template
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,15 +1,23 @@
|
||||||
import { readFileSync } from 'node:fs'
|
|
||||||
import { resolve } from 'node:path'
|
|
||||||
import { describe, expect, test } from 'vitest'
|
import { describe, expect, test } from 'vitest'
|
||||||
import { transform } from '../../src/utils/transformers'
|
import { transform } from '../../src/utils/transformers'
|
||||||
|
|
||||||
describe('transformSFC', () => {
|
describe('transformSFC', () => {
|
||||||
const appVuePath = resolve(__dirname, '../fixtures/transform-sfc/app.vue')
|
|
||||||
const content = readFileSync(appVuePath, 'utf-8')
|
|
||||||
test('basic', async () => {
|
test('basic', async () => {
|
||||||
const result = await transform({
|
const result = await transform({
|
||||||
filename: 'app.vue',
|
filename: 'app.vue',
|
||||||
raw: content,
|
raw: `<script lang="ts" setup>
|
||||||
|
const array: (number | string)[] = [1, 2, 3]
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div v-bind="{ array }">
|
||||||
|
template
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
|
`,
|
||||||
config: {},
|
config: {},
|
||||||
})
|
})
|
||||||
expect(result).toMatchSnapshot()
|
expect(result).toMatchSnapshot()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user