fix tests

This commit is contained in:
Gauthier Roebroeck 2026-02-12 16:54:28 +08:00
parent 00ba413262
commit 8364321034
2 changed files with 5 additions and 4 deletions

View file

@ -4,3 +4,4 @@ src/components.d.ts
src/typed-router.d.ts
src/generated/openapi/komga.d.ts
public-msw/mockServiceWorker.js
filters.md

View file

@ -39,21 +39,21 @@ describe('schema any all', () => {
describe('schema series status', () => {
test('correct value', () => {
const input = { v: 'ENDED' }
const input = 'ENDED'
const result = v.parse(SchemaSeriesStatus, input)
expect(result).toStrictEqual(input)
})
test('case insensitive', () => {
const input = { v: 'enDeD' }
const input = 'enDeD'
const result = v.parse(SchemaSeriesStatus, input)
expect(result).toStrictEqual({ v: 'ENDED' })
expect(result).toStrictEqual('ENDED')
})
test('other value throws error', () => {
const input = { v: 'whatever' }
const input = 'whatever'
expect(() => v.parse(SchemaSeriesStatus, input)).toThrowError()
})