add ignore clauses to tests

This commit is contained in:
Michael C
2023-02-20 22:20:47 -05:00
parent c84eb839a0
commit f70a26009c
6 changed files with 12 additions and 4 deletions

View File

@@ -25,13 +25,13 @@ export async function getSkipSegmentsByHash(req: Request, res: Response): Promis
try {
await getEtag("skipSegmentsHash", hashPrefix, service)
.then(etag => res.set("ETag", etag))
.catch(() => null);
.catch(/* istanbul ignore next */ () => null);
const output = Object.entries(segments).map(([videoID, data]) => ({
videoID,
segments: data.segments,
}));
return res.status(output.length === 0 ? 404 : 200).json(output);
} catch(e) {
} catch (e) /* istanbul ignore next */ {
Logger.error(`skip segments by hash error: ${e}`);
return res.status(500).send("Internal server error");