Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Improve fetch gist test to increase coverage #3107

Merged
merged 2 commits into from
Aug 20, 2023

Conversation

qwerty541
Copy link
Collaborator

If files array contains only one entry function for calculating primary language by bytes count not fully covered.

@vercel
Copy link

vercel bot commented Aug 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
github-readme-stats ✅ Ready (Inspect) Visit Preview Aug 20, 2023 5:48am

@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.05% 🎉

Comparison is base (32001d9) 97.67% compared to head (b5ab7e5) 97.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3107      +/-   ##
==========================================
+ Coverage   97.67%   97.72%   +0.05%     
==========================================
  Files          27       27              
  Lines        5811     5811              
  Branches      501      503       +2     
==========================================
+ Hits         5676     5679       +3     
+ Misses        133      130       -3     
  Partials        2        2              

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rickstaa rickstaa merged commit 9cb275f into master Aug 20, 2023
7 checks passed
@rickstaa rickstaa deleted the improve_fetch_gist_test_to_increase_coverage branch August 20, 2023 07:57
j4ckofalltrades pushed a commit to j4ckofalltrades/gh-stats that referenced this pull request Aug 29, 2023
* CI: Improve cards labeling (anuraghazra#3084)

* Tests: Gist card: Add more tests to check if emojis, themes and colors works properly (anuraghazra#3085)

* Refactor: Move hide_border into common options (anuraghazra#3086)

* Refactor: Tests: Rename renderTopLanguages.test.js file for consistency (anuraghazra#3088)

* Tests: Gist card: Add more render tests (anuraghazra#3087)

* Refactor: Gist card: Fix description type since it can be not set (anuraghazra#3089)

* Fix: Add missing gist card in express.js for other platforms deploy (anuraghazra#3096)

* CI: Fix top langs card render test path (anuraghazra#3095)

* Tests: Cover gist endpoint (anuraghazra#3097)

* feat(gist): handle missing param error (anuraghazra#3101)

* build: enable block-scoped-var and accessor-pairs eslint rules (anuraghazra#3102)

* Tests: Improve fetch gist test to increase coverage (anuraghazra#3107)

* Tests: Improve fetch gist test to increase coverage

* dev

* [Readme.md] Add Gist Card in Customization section (anuraghazra#3104)

* Update Customization section in readme

add "gist card" to the sentence in the customization section or Readme

* Update readme.md

---------

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>

* Gist card: handle not found error (anuraghazra#3100)

* Tests: Add gist endpoint missing id param test (anuraghazra#3106)

* Tests: Add gist endpoint not found test (anuraghazra#3110)

* tests: Add Wakatime fetcher error response test to increase coverage (anuraghazra#3112)

* Build(deps-dev): Bump @testing-library/jest-dom from 6.0.0 to 6.0.1 (anuraghazra#3117)

Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v6.0.0...v6.0.1)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps-dev): Bump jest-environment-jsdom from 29.6.2 to 29.6.3 (anuraghazra#3121)

Bumps [jest-environment-jsdom](https://github.com/jestjs/jest/tree/HEAD/packages/jest-environment-jsdom) from 29.6.2 to 29.6.3.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.6.3/packages/jest-environment-jsdom)

---
updated-dependencies:
- dependency-name: jest-environment-jsdom
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps-dev): Bump prettier from 3.0.1 to 3.0.2 (anuraghazra#3119)

Bumps [prettier](https://github.com/prettier/prettier) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.0.1...3.0.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps-dev): Bump jest from 29.6.2 to 29.6.3 (anuraghazra#3118)

Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) from 29.6.2 to 29.6.3.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.6.3/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps-dev): Bump lint-staged from 14.0.0 to 14.0.1 (anuraghazra#3120)

Bumps [lint-staged](https://github.com/okonet/lint-staged) from 14.0.0 to 14.0.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](lint-staged/lint-staged@v14.0.0...v14.0.1)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps): Bump actions/setup-node from 3.8.0 to 3.8.1 (anuraghazra#3122)

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.8.0 to 3.8.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@bea5baf...5e21ff4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps): Bump rickstaa/empty-issues-closer-action (anuraghazra#3123)

Bumps [rickstaa/empty-issues-closer-action](https://github.com/rickstaa/empty-issues-closer-action) from 1.1.10 to 1.1.12.
- [Release notes](https://github.com/rickstaa/empty-issues-closer-action/releases)
- [Commits](rickstaa/empty-issues-closer-action@2d870c9...a3c6576)

---
updated-dependencies:
- dependency-name: rickstaa/empty-issues-closer-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps): Bump rickstaa/top-issues-action from 1.3.37 to 1.3.39 (anuraghazra#3124)

Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.37 to 1.3.39.
- [Release notes](https://github.com/rickstaa/top-issues-action/releases)
- [Commits](rickstaa/top-issues-action@2f36d7c...19fa4a3)

---
updated-dependencies:
- dependency-name: rickstaa/top-issues-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* CI: Add more files for cards labeling (anuraghazra#3125)

* Top langs card: Remove unreachable code from fetcher and increase tests coverage (anuraghazra#3126)

* tests: reduce size of wakatime fetcher test (anuraghazra#3111)

* Tests: Add gist endpoint wrong locale test (anuraghazra#3127)

* Tests: Add index endpoint blacklist test (anuraghazra#3130)

* Enable no-unexpected-multiline eslint rule (anuraghazra#3132)

* Tests: Add index endpoint wrong locale test (anuraghazra#3131)

* Tests: Add top langs endpoint blacklist test (anuraghazra#3135)

* Tests: Add pin endpoint blacklist test (anuraghazra#3136)

* Tests: Add top langs endpoint wrong locale test (anuraghazra#3142)

* tests: add pin endpoint wrong locale test (anuraghazra#3143)

* Tests: Stats card: Add invalid username fetcher test (anuraghazra#3148)

* refactor: add missing jsdoc for I18n class methods (anuraghazra#3153)

* tests: add gist endpoint proper cache header test (anuraghazra#3152)

* Tests: Add pin endpoint missing params test (anuraghazra#3151)

* Tests: Stats card: Add hide all stats and rank icon test (anuraghazra#3149)

* Docs: Improve ask question link (anuraghazra#3157)

* docs: show additional stats icons (anuraghazra#3156)

* refactor: add missing jsdoc inside calculateRank.js (anuraghazra#3155)

* refactor: add missing jsdoc for IncorrectJsonFormatError constructor (anuraghazra#3154)

* Build(deps): Bump github/codeql-action from 2.21.4 to 2.21.5 (anuraghazra#3161)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.4 to 2.21.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@a09933a...00e563e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps): Bump rickstaa/empty-issues-closer-action (anuraghazra#3162)

Bumps [rickstaa/empty-issues-closer-action](https://github.com/rickstaa/empty-issues-closer-action) from 1.1.12 to 1.1.14.
- [Release notes](https://github.com/rickstaa/empty-issues-closer-action/releases)
- [Commits](rickstaa/empty-issues-closer-action@a3c6576...7b22903)

---
updated-dependencies:
- dependency-name: rickstaa/empty-issues-closer-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps): Bump actions/checkout from 3.5.3 to 3.6.0 (anuraghazra#3163)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@c85c95e...f43a0e5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps): Bump rickstaa/top-issues-action from 1.3.39 to 1.3.40 (anuraghazra#3164)

Bumps [rickstaa/top-issues-action](https://github.com/rickstaa/top-issues-action) from 1.3.39 to 1.3.40.
- [Release notes](https://github.com/rickstaa/top-issues-action/releases)
- [Commits](rickstaa/top-issues-action@19fa4a3...48db57e)

---
updated-dependencies:
- dependency-name: rickstaa/top-issues-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps-dev): Bump jest from 29.6.3 to 29.6.4 (anuraghazra#3169)

Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) from 29.6.3 to 29.6.4.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.6.4/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps-dev): Bump @testing-library/jest-dom from 6.0.1 to 6.1.2 (anuraghazra#3168)

Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 6.0.1 to 6.1.2.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v6.0.1...v6.1.2)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps-dev): Bump jest-environment-jsdom from 29.6.3 to 29.6.4 (anuraghazra#3167)

Bumps [jest-environment-jsdom](https://github.com/jestjs/jest/tree/HEAD/packages/jest-environment-jsdom) from 29.6.3 to 29.6.4.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.6.4/packages/jest-environment-jsdom)

---
updated-dependencies:
- dependency-name: jest-environment-jsdom
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps): Bump axios from 1.4.0 to 1.5.0 (anuraghazra#3166)

Bumps [axios](https://github.com/axios/axios) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* Build(deps-dev): Bump eslint from 8.47.0 to 8.48.0 (anuraghazra#3165)

Bumps [eslint](https://github.com/eslint/eslint) from 8.47.0 to 8.48.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.47.0...v8.48.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>

* ci: fix actions/checkout version comment inside empty issues closer action (anuraghazra#3170)

* docs: improve bug report link (anuraghazra#3171)

* docs: improve request feature link (anuraghazra#3172)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>
Co-authored-by: VydrOz <61025448+VydrOz@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
devantler pushed a commit to devantler/github-readme-stats that referenced this pull request Sep 24, 2023
* Tests: Improve fetch gist test to increase coverage

* dev
ABA2396 pushed a commit to ABA2396/github-readme-stats that referenced this pull request Dec 22, 2023
* Tests: Improve fetch gist test to increase coverage

* dev
ABA2396 pushed a commit to ABA2396/github-readme-stats that referenced this pull request Dec 22, 2023
* Tests: Improve fetch gist test to increase coverage

* dev
setdebarr pushed a commit to setdebarr/github-readme-stats that referenced this pull request Jan 12, 2024
* Tests: Improve fetch gist test to increase coverage

* dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants