Skip to content

Commit bdb2377

Browse files
authored
test: add coverage (#58)
1 parent 9b28355 commit bdb2377

File tree

6 files changed

+1691
-12
lines changed

6 files changed

+1691
-12
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
node_modules/
21
.env
2+
coverage
3+
node_modules/

lib/main.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export async function main(
100100
authorization: `bearer ${appAuthentication.token}`,
101101
},
102102
}).catch((error) => {
103+
/* c8 ignore next */
103104
if (error.status !== 404) throw error;
104105

105106
// https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-user-installation-for-the-authenticated-app
@@ -122,7 +123,7 @@ export async function main(
122123
core.setSecret(authentication.token);
123124

124125
core.setOutput("token", authentication.token);
125-
126+
126127
// Make token accessible to post function (so we can invalidate it)
127128
if (!skipTokenRevoke) {
128129
core.saveState("token", authentication.token);

main.js

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ main(
3333
}),
3434
skipTokenRevoke
3535
).catch((error) => {
36+
/* c8 ignore next 3 */
3637
console.error(error);
3738
core.setFailed(error.message);
3839
});

0 commit comments

Comments
 (0)