shadcn-vue/packages/cli/test/utils/transform-sfc.test.ts
2023-09-18 21:27:44 +08:00

18 lines
527 B
TypeScript

import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { describe, expect, test } from 'vitest'
import { transform } from '../../src/utils/transformers'
describe('transformSFC', () => {
const appVuePath = resolve(__dirname, '../fixtures/transform-sfc/app.vue')
const content = readFileSync(appVuePath, 'utf-8')
test('basic', async () => {
const result = await transform({
filename: 'app.vue',
raw: content,
config: {},
})
expect(result).toMatchSnapshot()
})
})