Skip to content

Instantly share code, notes, and snippets.

View kawahara's full-sized avatar

Shogo Kawahara (bucyou) kawahara

  • freee
  • Kyoto, Japan
  • 22:37 (UTC +09:00)
View GitHub Profile
@yann-yinn
yann-yinn / AppNavigation.specs.js
Last active July 31, 2018 18:47
How to unit test a Vue.js / Nuxt.js component that uses <nuxt-link> and store
import Vue from 'vue'
import AppNavigation from '~/components/AppNavigation'
// Mock our router, store and nuxt-link
import Vuex from 'vuex'
import storeCreate from '~/store'
import VueRouter from 'vue-router'
import NuxtLink from '~/.nuxt/components/nuxt-link'
Vue.use(VueRouter)
Vue.use(Vuex)