这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Wajahat5
Copy link
Contributor

@Wajahat5 Wajahat5 commented May 26, 2024

Description
Added new UTs for areaChart, barChart, sparkAreaChart, Legend components, and increased their coverage.

Added new files AreaChart.test.tsx, BarChart.test.tsx, SparkAreaChart.test.tsx and used existing file Legend.test.tsx to write UTs for areaChart, barChart, sparkAreaChart, Legend components.

Earlier the coverage for the said components looked like this:
All files | 49.66 | 22.91 | 35.94 | 50.76
AreaChart.tsx | 4 | 0 | 0 | 4.16 |
BarChart.tsx | 6 | 0 | 0 | 6.25 |
SparkAreaChart.tsx | 25 | 0 | 0 | 25 |
Legend.tsx | 35.29 | 23.88 | 28 | 35.36 |
Test Suites: 34 passed, 34 total
Tests: 45 passed, 45 total

After adding new tests, it looks like this:
File | % Stmts | % Branch | % Funcs | % Lines |
All files | 52.99 | 31.31 | 39.74 | 54.24
AreaChart.tsx | 28 | 43.08 | 20 | 29.16 |
BarChart.tsx | 28 | 42.2 | 16.66 | 29.16
SparkAreaChart.tsx | 100 | 72.72 | 100 | 100 |
Legend.tsx | 47.05 | 35.82 | 36 | 47.56 |
Test Suites: 37 passed, 37 total
Tests: 62 passed, 62 total

Related issue(s)
#1064

What kind of change does this PR introduce? (check at least one)

  • Bug fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • New Feature (BREAKING CHANGE which adds functionality)
  • Refactor
  • Build-related changes
  • Other, please describe:
  • unit test cases for areaChart, barChart, sparkAreaChart, Legend components.

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

How has this been tested?
By executing npm run tests -- --coverage --watchAll to get a report on the new ut coverage.
The changes does not effect other parts of the code as it only adds new tests.

The PR fulfils these requirements:

  • It's submitted to the main branch
  • When resolving a specific issue, it's referenced in the related issue section above
  • My change requires a change to the documentation. (Managed by Tremor Team)
  • I have added tests to cover my changes
  • Check the "Allow edits from maintainers" option while creating your PR.
  • Add refs #XXX or fixes #XXX to the related issue section if your PR refers to or fixes an issue.
  • By contributing to Tremor, you confirm that you have read and agreed to Tremor's CONTRIBUTING.md guideline. You also agree that your contributions will be licensed under the Apache License 2.0 license.

@vercel
Copy link

vercel bot commented May 26, 2024

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

Name Status Preview Comments Updated (UTC)
tremor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 4:26pm
tremor-npm-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 4:26pm
tremor-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 4:26pm

@Wajahat5 Wajahat5 changed the title #1064 uts for areaChart, barChart, sparkAreaChart, Legend test: uts for areaChart, barChart, sparkAreaChart, Legend May 26, 2024
@severinlandolt severinlandolt added Status: Review needed The issue/feature should be reviewed Type: Refactor Restructuring or improving existing code Type: Test Indicates that tests are affected. labels May 29, 2024
@severinlandolt
Copy link
Member

Nice! Will have a look at it in the next minor release 🚀

@severinlandolt severinlandolt changed the base branch from main to beta-headlessui December 6, 2024 16:18
@severinlandolt severinlandolt merged commit dfc8978 into tremorlabs:beta-headlessui Dec 6, 2024
6 checks passed
@github-actions
Copy link

github-actions bot commented Dec 6, 2024

🎉 This PR is included in version 3.18.5-beta-headlessui.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

severinlandolt added a commit that referenced this pull request Dec 7, 2024
* fix: bump headlessui

* fix: dialog

* test: uts for areaChart, barChart, sparkAreaChart, Legend (#1065)

* uts for areaChart, barChart, sparkAreaChart, Legend

* removed test code

* lint

---------

Co-authored-by: severinlandolt <sev.landolt@gmail.com>

* fix: datepicker position

* fix: selects

* chore: min width date picker

---------

Co-authored-by: Wajahat5 <66119464+Wajahat5@users.noreply.github.com>
@github-actions
Copy link

🎉 This PR is included in version 3.18.5-beta-tremor-v4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released on @beta-headlessui released on @beta-tremor-v4 Status: Review needed The issue/feature should be reviewed Type: Refactor Restructuring or improving existing code Type: Test Indicates that tests are affected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants