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: add unit tests for commands and utils #49

Merged
merged 13 commits into from
Sep 11, 2023

Conversation

JackHamer09
Copy link
Member

@JackHamer09 JackHamer09 commented Sep 8, 2023

What 💻

  • Added unit tests for commands and utils: npm run test
  • Added testing in the pr validation workflow including publish test results
  • Added request interceptor in the unit tests
  • Updated README and CONTRIBUTIONS with info about testing

Why ✋

  • Unit tests added and PR validation workflow updated to ensure the functionality works as expected and prevent regressions.
  • Request interceptor added to prevent making any network requests in unit tests, and in case it happens in will throw an error

Evidence 📷

image

@JackHamer09 JackHamer09 requested a review from a team as a code owner September 8, 2023 11:53
@github-actions
Copy link

github-actions bot commented Sep 8, 2023

Unit Test Results

31 tests   31 ✔️  8s ⏱️
  6 suites    0 💤
  1 files      0

Results for commit efc9d48.

♻️ This comment has been updated with latest results.

.github/workflows/pr-validation.yml Show resolved Hide resolved
tests/src/commands/create-project.spec.ts Outdated Show resolved Hide resolved
tests/requestInterceptor.ts Outdated Show resolved Hide resolved
tests/src/commands/create-project.spec.ts Outdated Show resolved Hide resolved
tests/src/commands/deposit.spec.ts Outdated Show resolved Hide resolved
tests/src/commands/deposit.spec.ts Outdated Show resolved Hide resolved
@MexicanAce
Copy link
Collaborator

Overall, the test structure (and tests themselves) look great! I wasn't expecting to have console output validation, but definitely glad it's there 😄 !

@JackHamer09 JackHamer09 changed the title chore: add tests tests: add unit tests for commands and utils Sep 11, 2023
Copy link
Collaborator

@MexicanAce MexicanAce left a comment

Choose a reason for hiding this comment

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

LGTM

@JackHamer09 JackHamer09 merged commit 2913e73 into main Sep 11, 2023
3 checks passed
@JackHamer09 JackHamer09 deleted the dr-devrl-216-unit-tests branch September 11, 2023 16:01
@github-actions
Copy link

🎉 This PR is included in version 0.6.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

🎉 This PR is included in version 0.6.0 🎉

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants