File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ import Vue from 'vue'
2+ import { shallowMount } from '@vue/test-utils' ;
3+ import CoreuiVue from '@coreui/vue'
4+ import CChartBarExample from '@/views/charts/CChartBarExample'
5+
6+ Vue . use ( CoreuiVue )
7+
8+ describe ( 'CChartBarExample' , ( ) => {
9+ it ( 'has a name' , ( ) => {
10+ expect ( CChartBarExample . name ) . toBe ( 'CChartBarExample' )
11+ } )
12+ it ( 'is Vue instance' , ( ) => {
13+ const wrapper = shallowMount ( CChartBarExample )
14+ expect ( wrapper . isVueInstance ( ) ) . toBe ( true )
15+ } )
16+ it ( 'is CChartBarExample' , ( ) => {
17+ const wrapper = shallowMount ( CChartBarExample )
18+ expect ( wrapper . is ( CChartBarExample ) ) . toBe ( true )
19+ } )
20+ test ( 'renders correctly' , ( ) => {
21+ const wrapper = shallowMount ( CChartBarExample )
22+ expect ( wrapper . element ) . toMatchSnapshot ( )
23+ } )
24+ it ( 'should have computed' , ( ) => {
25+ const wrapper = shallowMount ( CChartBarExample )
26+
27+ expect ( wrapper . vm . defaultDatasets ) . toBeDefined ( )
28+ } )
29+ } )
Original file line number Diff line number Diff line change 1+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+ exports [` CChartBarExample renders correctly 1` ] = `
4+ <cchartbar-stub
5+ datasets = " [object Object]"
6+ labels = " months"
7+ />
8+ ` ;
You can’t perform that action at this time.
0 commit comments