2019-10-11 22:13:55 +08:00
|
|
|
import { compile } from '../src'
|
|
|
|
|
|
|
|
describe('compile', () => {
|
|
|
|
it('should contain standard transforms', () => {
|
|
|
|
const { code } = compile(`<div v-text="text"></div>
|
|
|
|
<div v-html="html"></div>
|
|
|
|
<div v-cloak>test</div>
|
2020-02-21 20:10:13 +08:00
|
|
|
<div style="color:red">red</div>
|
2019-10-11 22:13:55 +08:00
|
|
|
<div :style="{color: 'green'}"></div>`)
|
|
|
|
|
|
|
|
expect(code).toMatchSnapshot()
|
|
|
|
})
|
|
|
|
})
|