diff --git a/test/vitest/__tests__/components/Paginate.spec.js b/test/vitest/__tests__/components/Paginate.spec.js index dcd74c72b..cf5e5d2ea 100644 --- a/test/vitest/__tests__/components/Paginate.spec.js +++ b/test/vitest/__tests__/components/Paginate.spec.js @@ -2,7 +2,7 @@ import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest'; import { createWrapper, axios } from 'app/test/vitest/helper'; import VnPaginate from 'src/components/ui/VnPaginate.vue'; -describe.skip('VnPaginate', () => { +describe('VnPaginate', () => { const expectedUrl = '/api/customers'; let vm; @@ -49,6 +49,8 @@ describe.skip('VnPaginate', () => { ], }); vm.arrayData.hasMoreData.value = true; + await vm.$nextTick(); + vm.store.data = [ { id: 1, name: 'Tony Stark' }, { id: 2, name: 'Jessica Jones' }, @@ -57,13 +59,13 @@ describe.skip('VnPaginate', () => { await vm.paginate(); - expect(vm.store.skip).toEqual(6); - expect(vm.store.data.length).toEqual(9); + expect(vm.store.skip).toEqual(3); + expect(vm.store.data.length).toEqual(6); await vm.paginate(); - expect(vm.store.skip).toEqual(9); - expect(vm.store.data.length).toEqual(12); + expect(vm.store.skip).toEqual(6); + expect(vm.store.data.length).toEqual(9); }); });