mirror of
https://github.com/gotson/komga.git
synced 2026-04-20 22:10:52 +02:00
page tests
This commit is contained in:
parent
b94402a64e
commit
dc7638cf52
1 changed files with 6 additions and 6 deletions
|
|
@ -2,32 +2,32 @@ import { describe, expect, test } from 'vitest'
|
|||
import * as v from 'valibot'
|
||||
import { SchemaStrictlyPositive } from '@/types/page'
|
||||
|
||||
describe('pagination composable', () => {
|
||||
test('page=1', () => {
|
||||
describe('schema strictly positive', () => {
|
||||
test('1', () => {
|
||||
const result = v.parse(SchemaStrictlyPositive, '1')
|
||||
|
||||
expect(result).toStrictEqual(1)
|
||||
})
|
||||
|
||||
test('page=5', () => {
|
||||
test('5', () => {
|
||||
const result = v.parse(SchemaStrictlyPositive, '5')
|
||||
|
||||
expect(result).toStrictEqual(5)
|
||||
})
|
||||
|
||||
test('page=0', () => {
|
||||
test('0', () => {
|
||||
const result = v.parse(SchemaStrictlyPositive, '0')
|
||||
|
||||
expect(result).toStrictEqual(1)
|
||||
})
|
||||
|
||||
test('page=-25', () => {
|
||||
test('-25', () => {
|
||||
const result = v.parse(SchemaStrictlyPositive, '')
|
||||
|
||||
expect(result).toStrictEqual(1)
|
||||
})
|
||||
|
||||
test('page=string', () => {
|
||||
test('string', () => {
|
||||
const result = v.parse(SchemaStrictlyPositive, 'some string')
|
||||
|
||||
expect(result).toStrictEqual(1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue