Fix failing tests

This commit is contained in:
Matt Rider 2019-05-21 16:53:50 -03:00
parent 610a7f6bfe
commit 4ac8c7f06b
3 changed files with 17 additions and 7 deletions

View File

@ -68,7 +68,8 @@ describe('users', () => {
it('with no name', async () => {
const variables = {
id: 'u47'
id: 'u47',
name: null
}
const expected = 'Username must be at least 3 characters long!'
await expect(client.request(mutation, variables))

View File

@ -41,10 +41,6 @@ export default {
}
}
},
mounted() {
// Everything is mounted and you can access the dropzone instance
const instance = this.$refs.el.dropzone
},
methods: {
template() {
return `<div class="dz-preview dz-file-preview">

View File

@ -1,11 +1,24 @@
import { shallowMount } from '@vue/test-utils'
import { shallowMount, createLocalVue } from '@vue/test-utils'
import Upload from '.'
import Vuex from 'vuex'
import Styleguide from '@human-connection/styleguide'
const localVue = createLocalVue()
localVue.use(Vuex)
localVue.use(Styleguide)
describe('Upload', () => {
let wrapper
let propsData
propsData = {
user: {
avatar: '/api/avatar.jpg'
}
}
beforeEach(() => {
wrapper = shallowMount(Upload, {})
wrapper = shallowMount(Upload, { localVue, propsData })
})
it('renders', () => {