Skip to content

Commit 16e3dae

Browse files
committed
fix eslint and coverage
1 parent ae4db82 commit 16e3dae

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/core/instance/render.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import config from '../config'
44
import VNode, { emptyVNode, cloneVNode, cloneVNodes } from '../vdom/vnode'
55
import { normalizeChildren } from '../vdom/helpers/index'
66
import {
7-
warn, formatComponentName, bind, isObject, toObject, isServerRendering,
7+
warn, formatComponentName, bind, isObject, toObject,
88
nextTick, resolveAsset, _toString, toNumber, looseEqual, looseIndexOf
99
} from '../util/index'
1010

test/unit/features/transition/transition.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,5 +849,12 @@ if (!isIE9) {
849849
expect(vm.$el.children[0].className).toBe('test')
850850
}).then(done)
851851
})
852+
853+
it('warn when used on multiple elements', () => {
854+
new Vue({
855+
template: `<transition><p>1</p><p>2</p></transition>`
856+
}).$mount()
857+
expect(`<transition> can only be used on a single element`).toHaveBeenWarned()
858+
})
852859
})
853860
}

0 commit comments

Comments
 (0)