Skip to content

Commit 35248d0

Browse files
committed
update(test): cascade picker warn test
1 parent b3d854f commit 35248d0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/unit/specs/cascade-picker.spec.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,19 @@ describe('CascadePicker', () => {
134134
.to.equal(cascadeData[1].children[1].children[0].value)
135135
})
136136

137+
it('should add warn log when sigle is true', () => {
138+
const app = new Vue()
139+
const originWarn = console.warn
140+
const msgs = []
141+
console.warn = function (...args) {
142+
msgs.push(args.join('#'))
143+
}
144+
vm = app.$createCascadePicker({}, true)
145+
expect(msgs.length)
146+
.to.equal(1)
147+
console.warn = originWarn
148+
})
149+
137150
function createCascadePicker(props = {}, events = {}) {
138151
return instantiateComponent(Vue, CascadePicker, {
139152
props: props,

0 commit comments

Comments
 (0)