Skip to content

Commit 3f8fa43

Browse files
committed
fix duplicate attribute test case in IE
1 parent d362d64 commit 3f8fa43

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/unit/modules/compiler/parser.spec.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { parse } from 'compiler/parser/index'
22
import { extend } from 'shared/util'
33
import { baseOptions } from 'web/compiler/index'
4+
import { isIE } from 'core/util/env'
45

56
describe('parser', () => {
67
it('simple element', () => {
@@ -320,10 +321,12 @@ describe('parser', () => {
320321
expect('Interpolation inside attributes has been deprecated').toHaveBeenWarned()
321322
})
322323

323-
it('duplicate attribute', () => {
324-
parse('<p class="class1" class="class1">hello world</p>', baseOptions)
325-
expect('duplicate attribute').toHaveBeenWarned()
326-
})
324+
if (!isIE) {
325+
it('duplicate attribute', () => {
326+
parse('<p class="class1" class="class1">hello world</p>', baseOptions)
327+
expect('duplicate attribute').toHaveBeenWarned()
328+
})
329+
}
327330

328331
it('custom delimiter', () => {
329332
const ast = parse('<p>{msg}</p>', extend({ delimiters: ['{', '}'] }, baseOptions))

0 commit comments

Comments
 (0)