Skip to content

Commit

Permalink
Missing summary error in annotations (#68)
Browse files Browse the repository at this point in the history
* bump all dev dependencies

* ignore warning when pass only multiple files

* 1.0.23

* build

* changelog
  • Loading branch information
MishaKav authored Mar 13, 2023
1 parent c0e038b commit 41b5ca0
Show file tree
Hide file tree
Showing 7 changed files with 1,178 additions and 384 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog of the Jest Coverage Comment

## [Jest Coverage Comment 1.0.23](https://github.com/MishaKav/jest-coverage-comment/tree/v1.0.23)

**Release Date:** 2023-03-13

#### Changes

- Remove summary error in annotations when provide one of `junitxml-path / coverage-path / multiple-files / multiple-junitxml-files` and not provide `coverage-summary-path` which have default value

## [Jest Coverage Comment 1.0.22](https://github.com/MishaKav/jest-coverage-comment/tree/v1.0.22)

**Release Date:** 2023-01-07
Expand Down
23 changes: 23 additions & 0 deletions __tests__/summary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,26 @@ describe('summary to markdown', () => {
)
})
})

describe('coverage when have default values', () => {
const options: Options = {
token: 'token_123',
repository: 'MishaKav/jest-coverage-comment',
commit: '05953710b21d222efa4f4535424a7af367be5a57',
watermark: '<!-- Jest Coverage Comment: 1 -->\n',
summaryTitle: '',
prefix: '',
badgeTitle: 'Coverage',
summaryFile: './coverage/coverage-summary.json',
multipleFiles: ['Title1, some/path/to/file/coverage.json'],
}

test('should ignore warning when summaryFile have default value and have multiple-files', () => {
const { summaryHtml, coverage, color } = getSummaryReport(options)

expect(summaryHtml).toBe('')
expect(coverage).toBe(0)
expect(color).toBe('red')
expect(spyCore.warning).toHaveBeenCalledTimes(0)
})
})
23 changes: 21 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 41b5ca0

Please sign in to comment.