-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e035f4a
commit 70d1496
Showing
6 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Libraries | ||
import Vue from 'vue' | ||
import Vuetify from 'vuetify' | ||
import { store } from '@/store' | ||
import { shallowMount } from '@vue/test-utils' | ||
|
||
// Components | ||
import StateExample from '@/views/StateExample.vue' | ||
import { ResourceExample } from '@/components/common' | ||
|
||
Vue.use(Vuetify) | ||
let vuetify = new Vuetify({}) | ||
|
||
describe('HelloWorld.vue', () => { | ||
let wrapper: any | ||
|
||
beforeEach(() => { | ||
// create wrapper for Dashboard | ||
// this stubs out the sub-component | ||
wrapper = shallowMount(StateExample, { store, vuetify }) | ||
}) | ||
|
||
afterEach(() => { | ||
wrapper.destroy() | ||
}) | ||
|
||
it('renders the sub-components properly', () => { | ||
expect(wrapper.find(ResourceExample).exists()).toBe(true) | ||
}) | ||
|
||
it('displays the appropriate welcome message', () => { | ||
expect(wrapper.vm.$el.querySelector('.stateExample').textContent) | ||
.toContain('Congratulations... it worked!') | ||
}) | ||
}) |