v1.0.10
This commit is contained in:
@@ -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')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user