Skip to content

Commit ceee8b0

Browse files
committed
test: added basic unit tests (except for charts). Unit tests segregated in directories.
1 parent 364c951 commit ceee8b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+70
-2
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/unit/theme/ColorTheme.spec.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import Vue from 'vue'
2+
import { shallowMount, mount } from '@vue/test-utils'
3+
import BootstrapVue from 'bootstrap-vue'
4+
import Component from '@/views/theme/ColorTheme'
5+
6+
Vue.use(BootstrapVue)
7+
const ComponentName = 'ColorTheme'
8+
9+
describe(ComponentName + '.vue', () => {
10+
it('has a name', () => {
11+
expect(Component.name).toMatch(ComponentName)
12+
})
13+
it('is Vue instance', () => {
14+
const wrapper = shallowMount(Component)
15+
expect(wrapper.isVueInstance()).toBe(true)
16+
})
17+
})

tests/unit/theme/ColorView.spec.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import Vue from 'vue'
2+
import { shallowMount, mount } from '@vue/test-utils'
3+
import BootstrapVue from 'bootstrap-vue'
4+
import Component from '@/views/theme/ColorView'
5+
6+
Vue.use(BootstrapVue)
7+
const ComponentName = 'ColorView'
8+
9+
describe(ComponentName + '.vue', () => {
10+
it('has a name', () => {
11+
expect(Component.name).toMatch(ComponentName)
12+
})
13+
it('is Vue instance', () => {
14+
const wrapper = shallowMount(Component)
15+
expect(wrapper.isVueInstance()).toBe(true)
16+
})
17+
})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/unit/widgets/Widget06.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,5 @@ describe(ComponentName + '.vue', () => {
1919
expect(wrapper.props().cardClasses).toBe('')
2020
expect(wrapper.props().header).toBe('header:string')
2121
expect(wrapper.props().text).toBe('text:string')
22-
expect(wrapper.props().chartType).toBe('chart1')
23-
expect(wrapper.props().chartHeight == 70).toBe(true)
2422
})
2523
})

tests/unit/widgets/Widget07.spec.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import Vue from 'vue'
2+
import { shallowMount } from '@vue/test-utils'
3+
import BootstrapVue from 'bootstrap-vue'
4+
import Component from '@/views/widgets/Widget07'
5+
6+
Vue.use(BootstrapVue)
7+
8+
const ComponentName = 'Widget07'
9+
const wrapper = shallowMount(Component)
10+
11+
describe(ComponentName + '.vue', () => {
12+
it('has a name', () => {
13+
expect(Component.name).toMatch(ComponentName)
14+
})
15+
it('is Vue instance', () => {
16+
expect(wrapper.isVueInstance()).toBe(true)
17+
})
18+
})

tests/unit/widgets/Widget08.spec.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import Vue from 'vue'
2+
import { shallowMount } from '@vue/test-utils'
3+
import BootstrapVue from 'bootstrap-vue'
4+
import Component from '@/views/widgets/Widget08'
5+
6+
Vue.use(BootstrapVue)
7+
8+
const ComponentName = 'Widget08'
9+
const wrapper = shallowMount(Component)
10+
11+
describe(ComponentName + '.vue', () => {
12+
it('has a name', () => {
13+
expect(Component.name).toMatch(ComponentName)
14+
})
15+
it('is Vue instance', () => {
16+
expect(wrapper.isVueInstance()).toBe(true)
17+
})
18+
})

0 commit comments

Comments
 (0)