mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: add pagination buttons
This commit is contained in:
1 parent
fa36b63fbe
commit
3b68693177
8 files changed
+52
-19
No files matched your search
@@ -3,7 +3,8 @@ import Pagination, { ASC, DESC } from '../src/models/pagination.js'
|
||||
|
||||
describe('Pagination', () => {
|
||||
it('should failed when not provide order', () => {
|
||||
expect(() => new Pagination()).toThrow('order must be asc or desc')
|
||||
expect(new Pagination('').getOrder()).toBe(DESC)
|
||||
expect(() => new Pagination('Hahaha')).toThrow()
|
||||
})
|
||||
it('should return correct limit', () => {
|
||||
const pagination = new Pagination(DESC, 10)
|
||||
|
||||
Reference in new issue
Block a user