Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
import { downloadFileSchema } from './file-operations.dto.js'
describe('downloadFileSchema', () => {
it.each(['https://files.example.test/archive.zip', 'http://203.0.113.1/archive.zip'])('accepts an HTTP(S) URL: %s', (url) => {
expect(downloadFileSchema.parse({ url })).toEqual({ url })
})
it.each(['ftp://files.example.test/archive.zip', 'https://files_server.example.test/archive.zip', 'https://files.example.test./archive.zip'])(
'rejects a URL outside the former IsUrl contract: %s',
(url) => {
expect(downloadFileSchema.safeParse({ url }).success).toBe(false)
}
)
})