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

chore: add more unit tests #7371

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

chore: add more unit tests #7371

wants to merge 2 commits into from

Conversation

ovflowd
Copy link
Member

@ovflowd ovflowd commented Dec 29, 2024

This PR adds more unit tests covering functionality on apps/site/util, apps/site/reducers and apps/site/providers

@ovflowd ovflowd requested a review from a team as a code owner December 29, 2024 12:17
Copy link

vercel bot commented Dec 29, 2024

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Dec 29, 2024 0:23am

Copy link
Contributor

github-actions bot commented Dec 29, 2024

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟠 78 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 99 🟢 100 🟢 100 🟢 92 🔗
/en/download 🟢 98 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 92 🔗

Copy link
Contributor

github-actions bot commented Dec 29, 2024

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 88%
87.1% (736/845) 72.13% (233/323) 86.33% (139/161)

Unit Test Report

Tests Skipped Failures Errors Time
185 0 💤 0 ❌ 0 🔥 5.491s ⏱️

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM, but when you have some const or other thing and and expect you need to add breakline to separate both thing

@ovflowd
Copy link
Member Author

ovflowd commented Dec 29, 2024

Mostly LGTM, but when you have some const or other thing and and expect you need to add breakline to separate both thing

Can you reference what file you're talking about? Most of this was generated by Copilot. I checked the tests and seem good enough, are you talking about code styling?

it('should return the initial state', () => {
const initialState = releaseState;
const action = { type: 'UNKNOWN_ACTION' };
expect(reducer(initialState, action)).toEqual(initialState);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(reducer(initialState, action)).toEqual(initialState);
expect(reducer(initialState, action)).toEqual(initialState);

Here for example you can add on breakline it's will give some aire to the code. And that allow to see step on the test

  1. const
  2. run
  3. assert (expect)

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

Successfully merging this pull request may close these issues.

2 participants