You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
486 B
17 lines
486 B
import Vue from 'vue'
|
|
|
|
export default function testObjectOption (name) {
|
|
it('should warn non object value', () => {
|
|
const options = {}
|
|
options[name] = () => {}
|
|
new Vue(options)
|
|
expect(`component option "${name}" should be an object`).toHaveBeenWarned()
|
|
})
|
|
|
|
it('should not warn valid object value', () => {
|
|
const options = {}
|
|
options[name] = {}
|
|
new Vue(options)
|
|
expect(`component option "${name}" should be an object`).not.toHaveBeenWarned()
|
|
})
|
|
}
|
|
|