feat(compiler-core): add comments parser option (#1858)
This commit is contained in:
committed by
GitHub
parent
823a2bc563
commit
62b9d02f6f
@@ -374,6 +374,16 @@ describe('compiler: parse', () => {
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
test('comments option', () => {
|
||||
__DEV__ = false
|
||||
const astNoComment = baseParse('<!--abc-->')
|
||||
const astWithComments = baseParse('<!--abc-->', { comments: true })
|
||||
__DEV__ = true
|
||||
|
||||
expect(astNoComment.children).toHaveLength(0)
|
||||
expect(astWithComments.children).toHaveLength(1)
|
||||
})
|
||||
})
|
||||
|
||||
describe('Element', () => {
|
||||
|
||||
Reference in New Issue
Block a user