Fix test
ci/woodpecker/manual/test Pipeline was successful

This commit is contained in:
2025-06-09 00:06:13 +02:00
parent 9fd6066851
commit 99bb9f700b
+2 -2
View File
@@ -129,7 +129,7 @@ describe('from_file', () => {
file = undefined
})
async function testing<T extends TSchema>(value: any | undefined, scheme: T, should_be_successful: boolean, data?: any) {
async function testing<T extends TSchema>(value: string | undefined, scheme: T, should_be_successful: boolean, data?: any) {
file = fileSync()
const name = file.name
@@ -153,7 +153,7 @@ describe('from_file', () => {
}
test('basic string', () => testing('Coucou', Type.String(), true, 'Coucou'))
test('basic number', () => testing(12, Type.Integer(), true, 12))
test('basic number', () => testing('12', Type.Integer(), true, 12))
test('file does not exist', () => testing(undefined, Type.String(), false))
test('Last empty line is trimmed', () => testing('Coucou\n\r\n ', Type.String(), true, 'Coucou'))
})