Add feature image grid

This commit is contained in:
2020-06-26 00:23:11 +02:00
parent 818382bd13
commit 66d4a53777
15 changed files with 186 additions and 214 deletions

View File

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

View File

@ -0,0 +1,12 @@
import { mount } from '@vue/test-utils'
import ImageGrid from '@/components/ImageGrid.vue'
describe('ImageGrid.vue', () => {
it('toggles loading', () => {
const wrapper = mount(ImageGrid)
expect(wrapper.vm.loading).toBe(true)
expect(wrapper.text()).toContain('Loading...')
wrapper.setData({ loading: false })
expect(wrapper.vm.loading).toBe(false)
})
})