|
@@ -57,6 +57,21 @@ describe('Global API', function () {
|
|
|
delete Vue.options.directives['plugin-test']
|
|
delete Vue.options.directives['plugin-test']
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ it('global mixin', function () {
|
|
|
|
|
+ var options = Vue.options
|
|
|
|
|
+ var spy = jasmine.createSpy('global mixin')
|
|
|
|
|
+ Vue.mixin({
|
|
|
|
|
+ created: function () {
|
|
|
|
|
+ spy(this.$options.myOption)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ new Vue({
|
|
|
|
|
+ myOption: 'hello'
|
|
|
|
|
+ })
|
|
|
|
|
+ expect(spy).toHaveBeenCalledWith('hello')
|
|
|
|
|
+ Vue.options = options
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
describe('Asset registration', function () {
|
|
describe('Asset registration', function () {
|
|
|
|
|
|
|
|
var Test = Vue.extend()
|
|
var Test = Vue.extend()
|