@@ -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'))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user