Skip to content

Commit d2c12da

Browse files
committed
Minor code refactor
1 parent c6a58e4 commit d2c12da

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

__tests__/main.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ describe('code-pushup action', () => {
222222

223223
expect(core.setFailed).not.toHaveBeenCalled()
224224

225-
expect(core.error).toHaveBeenCalledTimes(0)
226-
expect(core.warning).toHaveBeenCalledTimes(0)
227-
expect(core.notice).toHaveBeenCalledTimes(0)
225+
expect(core.error).not.toHaveBeenCalled()
226+
expect(core.warning).not.toHaveBeenCalled()
227+
expect(core.notice).not.toHaveBeenCalled()
228228

229229
expect(core.setOutput).toHaveBeenCalledWith('comment-id', 10)
230230

dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/issues.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function positionsMatch(
9797
return hasPosition(prev) === hasPosition(curr)
9898
}
9999
return (
100-
startLinesMatch(prev, curr, changedFiles) ||
100+
adjustedStartLinesMatch(prev, curr, changedFiles) ||
101101
adjustedLineSpansMatch(prev, curr, changedFiles)
102102
)
103103
}
@@ -108,7 +108,7 @@ function hasPosition(
108108
return source.position != null
109109
}
110110

111-
function startLinesMatch(
111+
function adjustedStartLinesMatch(
112112
prev: Required<SourceFileIssue['source']>,
113113
curr: Required<SourceFileIssue['source']>,
114114
changedFiles: ChangedFiles

0 commit comments

Comments
 (0)