mirror of
https://github.com/vuejs/vue.git
synced 2024-11-22 04:39:46 +00:00
18 lines
495 B
TypeScript
18 lines
495 B
TypeScript
import Vue from 'vue'
|
|
|
|
export default function testObjectOption(name) {
|
|
it(`Options ${name}: should warn non object value`, () => {
|
|
const options = {}
|
|
options[name] = () => {}
|
|
new Vue(options)
|
|
expect(`Invalid value for option "${name}"`).toHaveBeenWarned()
|
|
})
|
|
|
|
it(`Options ${name}: should not warn valid object value`, () => {
|
|
const options = {}
|
|
options[name] = {}
|
|
new Vue(options)
|
|
expect(`Invalid value for option "${name}"`).not.toHaveBeenWarned()
|
|
})
|
|
}
|