mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 12:35:30 +02:00
fix tests
This commit is contained in:
parent
00ba413262
commit
8364321034
2 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue