|
@@ -4,6 +4,10 @@ var config = require('../../../../src/config')
|
|
|
|
|
|
|
|
describe('Global API', function () {
|
|
describe('Global API', function () {
|
|
|
|
|
|
|
|
|
|
+ beforeEach(function () {
|
|
|
|
|
+ spyWarns()
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
it('exposed utilities', function () {
|
|
it('exposed utilities', function () {
|
|
|
expect(Vue.util).toBe(_)
|
|
expect(Vue.util).toBe(_)
|
|
|
expect(Vue.nextTick).toBe(_.nextTick)
|
|
expect(Vue.nextTick).toBe(_.nextTick)
|
|
@@ -39,6 +43,15 @@ describe('Global API', function () {
|
|
|
expect(t2.$options.b).toBe(2)
|
|
expect(t2.$options.b).toBe(2)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ it('extend warn invalid names', function () {
|
|
|
|
|
+ Vue.extend({ name: '123' })
|
|
|
|
|
+ expect(hasWarned('Invalid component name: 123')).toBe(true)
|
|
|
|
|
+ Vue.extend({ name: '_fesf' })
|
|
|
|
|
+ expect(hasWarned('Invalid component name: _fesf')).toBe(true)
|
|
|
|
|
+ Vue.extend({ name: 'Some App' })
|
|
|
|
|
+ expect(hasWarned('Invalid component name: Some App')).toBe(true)
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
it('use', function () {
|
|
it('use', function () {
|
|
|
var def = {}
|
|
var def = {}
|
|
|
var options = {}
|
|
var options = {}
|