Update tests to get them passing again (#2853)

This commit is contained in:
Paul Frazee 2024-02-12 18:55:19 -08:00 committed by GitHub
parent fad40dda97
commit 543e114877
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 214 additions and 83 deletions

View file

@ -5,12 +5,13 @@ import {compressIfNeeded} from './manip'
let _imageCounter = 0
async function getFile() {
const files = await RNFS.readDir(
let files = await RNFS.readDir(
RNFS.LibraryDirectoryPath.split('/')
.slice(0, -5)
.concat(['Media', 'DCIM', '100APPLE'])
.join('/'),
)
files = files.filter(file => file.path.endsWith('.JPG'))
const file = files[_imageCounter++ % files.length]
return await compressIfNeeded({
path: file.path,