shadcn-vue/packages/cli/test/utils/transform-cjs-to-esm.test.ts
Dunqing f4b5b3fbc4
feat(cli): support tailwind.config.mjs file (#120)
* feat(cli): support `tailwind.config.mjs` file

* feat: update

* fix: teest case

---------

Co-authored-by: sadeghbarati <sadeghbaratiwork@gmail.com>
2023-10-21 10:25:41 +08:00

9 lines
435 B
TypeScript

import { expect, test } from 'vitest'
import { TAILWIND_CONFIG, TAILWIND_CONFIG_WITH_VARIABLES } from '../../src/utils/templates'
import { transformCJSToESM } from '../../src/utils/transformers/transform-cjs-to-esm'
test('handle tailwind config template correctly', () => {
expect(transformCJSToESM('.mjs', TAILWIND_CONFIG)).toMatchSnapshot()
expect(transformCJSToESM('.mjs', TAILWIND_CONFIG_WITH_VARIABLES)).toMatchSnapshot()
})