uses cli-plugin-unit-mocha from vue

This commit is contained in:
2019-04-20 21:30:04 +02:00
parent 74a823ad26
commit f6ab07b346
7 changed files with 388 additions and 879 deletions

View File

@@ -0,0 +1,5 @@
module.exports = {
env: {
mocha: true
}
}

View File

@@ -0,0 +1,13 @@
import { expect } from 'chai'
import { shallowMount } from '@vue/test-utils'
import HelloWorld from '@/components/RessourceField'
describe('HelloWorld.vue', () => {
it('renders props.msg when passed', () => {
const msg = 'new message'
const wrapper = shallowMount(HelloWorld, {
propsData: { msg }
})
expect(wrapper.text()).to.include(msg)
})
})