Closed
Description
Hi,
Do you have any recommendations for how to test for paginated data with vue-test-utils?
My typical test looks like this:
it('mounts', async () => {
expect.assertions(1);
mock.onGet('/api-uri')
.reply(200, JSON.stringify([
firstItem,
secondItem,
]), {'x-total-count': 2});
wrapper = mount(
Component,
{
localVue,
router,
store,
mocks: {
$route,
},
stubs: ['router-link', 'router-view']
},
);
await flushPromises();
await wrapper.vm.$nextTick();
});
However, the computed createInstance()
seems stuck in the .loading
state, even after I've flushed the promises and waited for a re-render.
Any ideas on what I might be doing wrong?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels