reinitialize lootalot_front to add unit testing
This commit is contained in:
14
lootalot_front/tests/unit/Wealth.spec.js
Normal file
14
lootalot_front/tests/unit/Wealth.spec.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { expect } from 'chai'
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import Wealth from '@/components/Wealth.vue'
|
||||
|
||||
describe('Wealth.vue', () => {
|
||||
it('renders wealth when passed', () => {
|
||||
const wealth = [1, 2, 3, 4]
|
||||
const wrapper = shallowMount(Wealth, {
|
||||
propsData: { wealth }
|
||||
})
|
||||
var divs = wrapper.findAll('div')
|
||||
expect(wrapper.text()).to.include(wealth)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user