This commit is contained in:
xidedix
2018-02-02 17:09:58 +01:00
parent e122f00746
commit 17267e43f3
35 changed files with 553 additions and 491 deletions
@@ -0,0 +1,22 @@
import Vue from 'vue'
import BootstrapVue from 'bootstrap-vue'
import Dashboard from '@/views/Dashboard'
Vue.use(BootstrapVue)
describe('Dashboard', () => {
it('has a created hook', () => {
expect(typeof Dashboard.data).to.equal('function')
})
it('sets the correct default data', () => {
expect(typeof Dashboard.data).to.equal('function')
const defaultData = Dashboard.data()
expect(defaultData.selected).to.equal('Month')
})
it('should render correct contents', () => {
const Constructor = Vue.extend(Dashboard)
const vm = new Constructor().$mount()
expect(vm.$el.querySelector('#traffic').textContent)
.to.equal('Traffic')
})
})
@@ -1,11 +0,0 @@
import Vue from 'vue'
import Hello from '@/components/Hello'
describe('Hello.vue', () => {
it('should render correct contents', () => {
const Constructor = Vue.extend(Hello)
const vm = new Constructor().$mount()
expect(vm.$el.querySelector('.hello h1').textContent)
.to.equal('Welcome to Your Vue.js App')
})
})