Skip to content

Commit 13cd8bd

Browse files
committed
test: write tests for ChatSkipConditions
1 parent 2facebd commit 13cd8bd

File tree

2 files changed

+671
-3
lines changed

2 files changed

+671
-3
lines changed

src/utils/chat-skip-conditions.util.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,12 @@ export class ChatSkipConditions {
219219
isIssueComment(this.context.payload) ||
220220
isIssue(this.context.payload)
221221
) {
222-
this.context.payload.issue.title;
222+
return this.context.payload.issue.title;
223223
} else if (isDiscussion(this.context.payload) || isDiscussionComment(this.context.payload)) {
224224
return this.context.payload.discussion.title;
225+
} else {
226+
throw new SystemError('Unhandled case');
225227
}
226-
227-
throw new SystemError('Unhandled case');
228228
}
229229

230230
private getLocked(): boolean {

0 commit comments

Comments
 (0)