vue-add-globals
Add globals to Vue. Use it in tests to mock global methods and properties.
Example
Adding a property and method to Vue
const $someMethod = {}const someProp = 'prop'const Ctor = Vueconst vm = tt
Installation
npm install --save-dev vue-add-globals
Usage
- Import 'vue-add-globals'
- Call it with object of global properties to add
You can keep the global Vue class clean by using Vue.extend()
:
const freshVue = Vue