Skip to content

Commit

Permalink
chore: move test to same dir as unit under test
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Feb 29, 2024
1 parent 4d0ffa6 commit cff1bd7
Show file tree
Hide file tree
Showing 3 changed files with 265 additions and 458 deletions.
8 changes: 6 additions & 2 deletions packages/verified-fetch/src/utils/parse-url-string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,19 @@ export async function parseUrlString ({ urlString, ipns, logger }: ParseUrlStrin
resolvedPath = resolveResult?.path
log.trace('resolved %s to %c', cidOrPeerIdOrDnsLink, cid)
ipnsCache.set(cidOrPeerIdOrDnsLink, resolveResult, 60 * 1000 * 2)
} catch (err) {
} catch (err: any) {
log.error('Could not resolve DnsLink for "%s"', cidOrPeerIdOrDnsLink, err)
errors.push(err as Error)
errors.push(err)
}
}
}
}

if (cid == null) {
if (errors.length === 1) {
throw errors[0]
}

throw new AggregateError(errors, `Invalid resource. Cannot determine CID from URL "${urlString}"`)
}

Expand Down
323 changes: 0 additions & 323 deletions packages/verified-fetch/test/parse-url-string.spec.ts

This file was deleted.

Loading

0 comments on commit cff1bd7

Please sign in to comment.