Skip to content

Commit a4a0b68

Browse files
committed
test: update tests
1 parent 7ee3b0f commit a4a0b68

Some content is hidden

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

41 files changed

+77
-81
lines changed

tests/unit/App.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ describe('App.vue', () => {
1919
localVue,
2020
router
2121
})
22-
expect(wrapper.isVueInstance()).toBe(true)
22+
expect(wrapper.vm).toBeTruthy()
2323
})
2424
it('is App', () => {
2525
const wrapper = shallowMount(App, {
2626
localVue,
2727
router
2828
})
29-
expect(wrapper.is(App)).toBe(true)
29+
expect(wrapper.findComponent(App)).toBeTruthy()
3030
})
3131
})

tests/unit/containers/TheContainer.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ describe('TheContainer.vue', () => {
3737
localVue,
3838
router
3939
})
40-
expect(wrapper.isVueInstance()).toBe(true)
40+
expect(wrapper.vm).toBeTruthy()
4141
})
4242
})

tests/unit/views/Dashboard.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ describe('Dashboard.vue', () => {
2020
})
2121
it('is Vue instance', () => {
2222
const wrapper = shallowMount(Dashboard)
23-
expect(wrapper.isVueInstance()).toBe(true)
23+
expect(wrapper.vm).toBeTruthy()
2424
})
2525
it('is Dashboard', () => {
2626
const wrapper = shallowMount(Dashboard)
27-
expect(wrapper.is(Dashboard)).toBe(true)
27+
expect(wrapper.findComponent(Dashboard)).toBeTruthy()
2828
})
2929
it('should render correct content', () => {
3030
const wrapper = shallowMount(Dashboard)

tests/unit/views/base/Breadcrumbs.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ describe('Breadcrumbs.vue', () => {
1919
})
2020
it('is Vue instance', () => {
2121
const wrapper = shallowMount(Breadcrumbs)
22-
expect(wrapper.isVueInstance()).toBe(true)
22+
expect(wrapper.vm).toBeTruthy()
2323
})
2424
it('is Breadcrumbs', () => {
2525
const wrapper = shallowMount(Breadcrumbs)
26-
expect(wrapper.is(Breadcrumbs)).toBe(true)
26+
expect(wrapper.findComponent(Breadcrumbs)).toBeTruthy()
2727
})
2828
test('renders correctly', () => {
2929
const wrapper = mount(Breadcrumbs)

tests/unit/views/base/Cards.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ describe('Cards.vue', () => {
1919
})
2020
it('is Vue instance', () => {
2121
const wrapper = shallowMount(Cards)
22-
expect(wrapper.isVueInstance()).toBe(true)
22+
expect(wrapper.vm).toBeTruthy()
2323
})
2424
it('is Cards', () => {
2525
const wrapper = shallowMount(Cards)
26-
expect(wrapper.is(Cards)).toBe(true)
26+
expect(wrapper.findComponent(Cards)).toBeTruthy()
2727
})
2828
test('renders correctly', () => {
2929
const wrapper = mount(Cards)

tests/unit/views/base/Carousels.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Carousels.vue', () => {
1111
})
1212
it('is Carousels', () => {
1313
const wrapper = shallowMount(Carousels)
14-
expect(wrapper.is(Carousels)).toBe(true)
14+
expect(wrapper.findComponent(Carousels)).toBeTruthy()
1515
})
1616
test('renders correctly', () => {
1717
const wrapper = mount(Carousels)

tests/unit/views/base/Collapses.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Collapses.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(Collapses)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
test('renders correctly', () => {
1717
const wrapper = mount(Collapses)

tests/unit/views/base/Forms.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Forms.vue', () => {
1111
})
1212
it('is Forms', () => {
1313
const wrapper = shallowMount(Forms)
14-
expect(wrapper.is(Forms)).toBe(true)
14+
expect(wrapper.findComponent(Forms)).toBeTruthy()
1515
})
1616
// render random chackboxes
1717
// test('renders correctly', () => {

tests/unit/views/base/Jumbotrons.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ describe('Jumbotrons.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(Jumbotrons)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is Jumbotrons', () => {
1717
const wrapper = shallowMount(Jumbotrons)
18-
expect(wrapper.is(Jumbotrons)).toBe(true)
18+
expect(wrapper.findComponent(Jumbotrons)).toBeTruthy()
1919
})
2020
test('renders correctly', () => {
2121
const wrapper = shallowMount(Jumbotrons)

tests/unit/views/base/ListGroups.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ describe('ListGroups.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(ListGroups)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is ListGroups', () => {
1717
const wrapper = shallowMount(ListGroups)
18-
expect(wrapper.is(ListGroups)).toBe(true)
18+
expect(wrapper.findComponent(ListGroups)).toBeTruthy()
1919
})
2020
test('renders correctly', () => {
2121
const wrapper = shallowMount(ListGroups)

tests/unit/views/base/Navbars.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ describe('Navbars.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(Navbars)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is Navbars', () => {
1717
const wrapper = shallowMount(Navbars)
18-
expect(wrapper.is(Navbars)).toBe(true)
18+
expect(wrapper.findComponent(Navbars)).toBeTruthy()
1919
})
2020
test('renders correctly', () => {
2121
const wrapper = shallowMount(Navbars)

tests/unit/views/base/Navs.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ describe('Navs.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(Navs)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is Navbars', () => {
1717
const wrapper = shallowMount(Navs)
18-
expect(wrapper.is(Navs)).toBe(true)
18+
expect(wrapper.findComponent(Navs)).toBeTruthy()
1919
})
2020
test('renders correctly', () => {
2121
const wrapper = shallowMount(Navs)

tests/unit/views/base/Paginations.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ describe('Paginations.vue', () => {
1919
})
2020
it('is Vue instance', () => {
2121
const wrapper = shallowMount(Paginations)
22-
expect(wrapper.isVueInstance()).toBe(true)
22+
expect(wrapper.vm).toBeTruthy()
2323
})
2424
it('is Paginations', () => {
2525
const wrapper = shallowMount(Paginations)
26-
expect(wrapper.is(Paginations)).toBe(true)
26+
expect(wrapper.findComponent(Paginations)).toBeTruthy()
2727
})
2828
test('renders correctly', () => {
2929
const wrapper = shallowMount(Paginations)

tests/unit/views/base/Popovers.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ describe('Popovers.vue', () => {
1414
})
1515
it('is Vue instance', () => {
1616
const wrapper = shallowMount(Popovers)
17-
expect(wrapper.isVueInstance()).toBe(true)
17+
expect(wrapper.vm).toBeTruthy()
1818
})
1919
it('is Popovers', () => {
2020
const wrapper = shallowMount(Popovers)
21-
expect(wrapper.is(Popovers)).toBe(true)
21+
expect(wrapper.findComponent(Popovers)).toBeTruthy()
2222
})
2323
})

tests/unit/views/base/ProgressBars.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ describe('ProgressBars.vue', () => {
1919
})
2020
it('is Vue instance', () => {
2121
const wrapper = mount(ProgressBars)
22-
expect(wrapper.isVueInstance()).toBe(true)
22+
expect(wrapper.vm).toBeTruthy()
2323
})
2424
it('is ProgressBars', () => {
2525
const wrapper = mount(ProgressBars)
26-
expect(wrapper.is(ProgressBars)).toBe(true)
26+
expect(wrapper.findComponent(ProgressBars)).toBeTruthy()
2727
})
2828
test('renders correctly', () => {
2929
const wrapper = shallowMount(ProgressBars)

tests/unit/views/base/Switches.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ describe('Switches.vue', () => {
1414
})
1515
it('is Vue instance', () => {
1616
const wrapper = mount(Switches)
17-
expect(wrapper.isVueInstance()).toBe(true)
17+
expect(wrapper.vm).toBeTruthy()
1818
})
1919
it('is Switches', () => {
2020
const wrapper = mount(Switches)
21-
expect(wrapper.is(Switches)).toBe(true)
21+
expect(wrapper.findComponent(Switches)).toBeTruthy()
2222
})
2323
test('renders correctly', () => {
2424
const wrapper = shallowMount(Switches)

tests/unit/views/base/Table.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ describe('Table.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = mount(Table)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is Table', () => {
1717
const wrapper = mount(Table)
18-
expect(wrapper.is(Table)).toBe(true)
18+
expect(wrapper.findComponent(Table)).toBeTruthy()
1919
})
2020
test('renders correctly', () => {
2121
const wrapper = shallowMount(Table)

tests/unit/views/base/Tables.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ describe('Tables.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = mount(Tables)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is Tables', () => {
1717
const wrapper = mount(Tables)
18-
expect(wrapper.is(Tables)).toBe(true)
18+
expect(wrapper.findComponent(Tables)).toBeTruthy()
1919
})
2020
test('renders correctly', () => {
2121
const wrapper = shallowMount(Tables)

tests/unit/views/base/Tabs.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ describe('Tabs.vue', () => {
1717
})
1818
it('is Vue instance', () => {
1919
const wrapper = mount(Tabs)
20-
expect(wrapper.isVueInstance()).toBe(true)
20+
expect(wrapper.vm).toBeTruthy()
2121
})
2222
it('is Tabs', () => {
2323
const wrapper = mount(Tabs)
24-
expect(wrapper.is(Tabs)).toBe(true)
24+
expect(wrapper.findComponent(Tabs)).toBeTruthy()
2525
})
2626
test('renders correctly', () => {
2727
const wrapper = shallowMount(Tabs)

tests/unit/views/base/Tooltips.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ describe('Tooltips.vue', () => {
1414
})
1515
it('is Vue instance', () => {
1616
const wrapper = shallowMount(Tooltips)
17-
expect(wrapper.isVueInstance()).toBe(true)
17+
expect(wrapper.vm).toBeTruthy()
1818
})
1919
it('is Tooltips', () => {
2020
const wrapper = shallowMount(Tooltips)
21-
expect(wrapper.is(Tooltips)).toBe(true)
21+
expect(wrapper.findComponent(Tooltips)).toBeTruthy()
2222
})
2323
test('renders correctly', () => {
2424
const wrapper = shallowMount(Tooltips)

tests/unit/views/buttons/BrandButtons.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ describe('BrandButtons.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(BrandButtons)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is BrandButtons', () => {
1717
const wrapper = shallowMount(BrandButtons)
18-
expect(wrapper.is(BrandButtons)).toBe(true)
18+
expect(wrapper.findComponent(BrandButtons)).toBeTruthy()
1919
})
2020
test('renders correctly', () => {
2121
const wrapper = mount(BrandButtons)

tests/unit/views/buttons/ButtonDropdowns.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ describe('Dropdowns.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(Dropdowns)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is Dropdowns', () => {
1717
const wrapper = shallowMount(Dropdowns)
18-
expect(wrapper.is(Dropdowns)).toBe(true)
18+
expect(wrapper.findComponent(Dropdowns)).toBeTruthy()
1919
})
2020
test('renders correctly', () => {
2121
const wrapper = mount(Dropdowns)

tests/unit/views/buttons/ButtonGroups.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ describe('ButtonGroups.vue', () => {
1111
expect(ButtonGroups.name).toBe('ButtonGroups')
1212
})
1313
it('is Vue instance', () => {
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is ButtonGroups', () => {
17-
expect(wrapper.is(ButtonGroups)).toBe(true)
17+
expect(wrapper.findComponent(ButtonGroups)).toBeTruthy()
1818
})
1919
test('renders correctly', () => {
2020
expect(wrapper.element).toMatchSnapshot()

tests/unit/views/buttons/StandardButtons.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ describe('StandardButtons.vue', () => {
1919
})
2020
it('is Vue instance', () => {
2121
const wrapper = shallowMount(StandardButtons)
22-
expect(wrapper.isVueInstance()).toBe(true)
22+
expect(wrapper.vm).toBeTruthy()
2323
})
2424
it('is StandardButtons', () => {
2525
const wrapper = shallowMount(StandardButtons)
26-
expect(wrapper.is(StandardButtons)).toBe(true)
26+
expect(wrapper.findComponent(StandardButtons)).toBeTruthy()
2727
})
2828
test('renders correctly', () => {
2929
const wrapper = shallowMount(StandardButtons)

tests/unit/views/charts/CChartBarExample.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ describe('CChartBarExample', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(CChartBarExample)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is CChartBarExample', () => {
1717
const wrapper = shallowMount(CChartBarExample)
18-
expect(wrapper.is(CChartBarExample)).toBe(true)
18+
expect(wrapper.findComponent(CChartBarExample)).toBeTruthy()
1919
})
2020
test('renders correctly', () => {
2121
const wrapper = shallowMount(CChartBarExample)

tests/unit/views/charts/Charts.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ describe('Charts.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(Charts)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is Charts', () => {
1717
const wrapper = shallowMount(Charts)
18-
expect(wrapper.is(Charts)).toBe(true)
18+
expect(wrapper.findComponent(Charts)).toBeTruthy()
1919
})
2020
test('renders correctly', () => {
2121
const wrapper = shallowMount(Charts)

tests/unit/views/icons/Brands.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ describe('Brands.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(Brands)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is Brands', () => {
1717
const wrapper = shallowMount(Brands)
18-
expect(wrapper.is(Brands)).toBe(true)
18+
expect(wrapper.findComponent(Brands)).toBeTruthy()
1919
})
2020
})

tests/unit/views/icons/CoreUIIcons.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ describe('CoreUIIcons.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(CoreUIIcons)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is CoreUIIcons', () => {
1717
const wrapper = shallowMount(CoreUIIcons)
18-
expect(wrapper.is(CoreUIIcons)).toBe(true)
18+
expect(wrapper.findComponent(CoreUIIcons)).toBeTruthy()
1919
})
2020
})

tests/unit/views/icons/Flags.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ describe('Flags.vue', () => {
1111
})
1212
it('is Vue instance', () => {
1313
const wrapper = shallowMount(Flags)
14-
expect(wrapper.isVueInstance()).toBe(true)
14+
expect(wrapper.vm).toBeTruthy()
1515
})
1616
it('is Flags', () => {
1717
const wrapper = shallowMount(Flags)
18-
expect(wrapper.is(Flags)).toBe(true)
18+
expect(wrapper.findComponent(Flags)).toBeTruthy()
1919
})
2020
})

tests/unit/views/notifications/Alerts.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ describe('Alerts.vue', () => {
1717
})
1818
it('is Vue instance', () => {
1919
const wrapper = shallowMount(Alerts)
20-
expect(wrapper.isVueInstance()).toBe(true)
20+
expect(wrapper.vm).toBeTruthy()
2121
})
2222
it('is Alerts', () => {
2323
const wrapper = shallowMount(Alerts)
24-
expect(wrapper.is(Alerts)).toBe(true)
24+
expect(wrapper.findComponent(Alerts)).toBeTruthy()
2525
})
2626
test('renders correctly', () => {
2727
const wrapper = shallowMount(Alerts)

0 commit comments

Comments
 (0)