This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// EventBus.js | |
export const eventBus = new Vue() | |
// FileA.js | |
import { EventBus } from './EventBus' | |
const x = 'my param' | |
EventBus.$emit('event-name', x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Todo from 'src/components/Todo' | |
describe('Todo component', () => { | |
let vm = null | |
let todo = null | |
beforeEach(() => { | |
vm = new Vue({ | |
render (h) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isFunction = function(o) { | |
return typeof o === 'function'; | |
}; | |
var bind, | |
slice = [].slice, | |
proto = Function.prototype, | |
featureMap; | |
featureMap = { |