Skip to content

Commit 9ef0eaf

Browse files
committed
add istanbul exclusions
1 parent d80be9e commit 9ef0eaf

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/routes/generateToken.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export async function generateTokenRequest(req: GenerateTokenRequest, res: Respo
2323
if (type === TokenType.patreon || (type === TokenType.local && adminUserID === config.adminUserID)) {
2424
const licenseKey = await createAndSaveToken(type, code);
2525

26+
/* istanbul ignore else */
2627
if (licenseKey) {
2728
return res.status(200).send(`
2829
<h1>

src/utils/innerTubeAPI.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ async function getFromITube (videoID: string): Promise<innerTubeVideoDetails> {
1818
const result = await axios.post(url, data, {
1919
timeout: 3500
2020
});
21+
/* istanbul ignore else */
2122
if (result.status === 200) {
2223
return result.data.videoDetails;
2324
} else {
@@ -39,6 +40,7 @@ export async function getPlayerData (videoID: string, ignoreCache = false): Prom
3940
return data as innerTubeVideoDetails;
4041
}
4142
} catch (err) {
43+
/* istanbul ignore next */
4244
return Promise.reject(err);
4345
}
4446
}

0 commit comments

Comments
 (0)