Skip to content

Instantly share code, notes, and snippets.

@pablocattaneo
Last active February 5, 2019 17:36
Show Gist options
  • Save pablocattaneo/3cc81f8c67840c1617c521c2b7385a18 to your computer and use it in GitHub Desktop.
Save pablocattaneo/3cc81f8c67840c1617c521c2b7385a18 to your computer and use it in GitHub Desktop.
// Using stubs
import { shallowMount } from '@vue/test-utils'
import LmPagination from '@/components/LmPagination.vue'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
describe('LmPagination', () => {
const wrapper = shallowMount(LmPagination, {
propsData: {
allRegistries: 300,
maxAmountItemsShowsPerPaginationInTable: 10
},
mocks: {
$t: (msg) => msg
},
stubs: {
'font-awesome-icon': FontAwesomeIcon
}
})
test('is a Vue instance', () => {
expect(wrapper.isVueInstance()).toBeTruthy()
})
it('has a li', () => {
expect(wrapper.contains('li')).toBe(true)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment