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

fix: Added tests and workflow to run tests on release and PRs #104

Closed
wants to merge 7 commits into from

Conversation

Rachit1313
Copy link

@Rachit1313 Rachit1313 commented Nov 23, 2023

Description

This pull request addresses the following changes:

  • Implemented tests for the @adobe/create-aio-lib@2.0.1 workflow.
  • Added test cases for the CreateAioLibCommand methods, including copyTemplate, cloneRepo, removeDotGitFolder, readParametersFile, and updatePackageJson.
  • Ensured that the tests cover various scenarios, including successful execution and error handling.
  • Added the workflow to run the new tests.

Related Issue

#103

Motivation and Context

How Has This Been Tested?

These changes have been tested using the following steps:

  1. Ran the @adobe/create-aio-lib@2.0.1 test workflow using mocha tests/unit.
  2. Verified that the tests cover different aspects of the CreateAioLibCommand functionality.
  3. Ensured that all tests passed successfully.

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@Rachit1313 Rachit1313 closed this Nov 23, 2023
@Rachit1313 Rachit1313 reopened this Nov 23, 2023
@Rachit1313
Copy link
Author

@shazron , Could you please take a look at the above?

@Rachit1313 Rachit1313 changed the title Added tests and workflow to run tests on release and PRs fix : Added tests and workflow to run tests on release and PRs Nov 23, 2023
@Rachit1313 Rachit1313 changed the title fix : Added tests and workflow to run tests on release and PRs fix: Added tests and workflow to run tests on release and PRs Nov 23, 2023
@Rachit1313
Copy link
Author

@shazron , Did you get a chance to review the above?

@shazron
Copy link
Member

shazron commented Nov 28, 2023

@Rachit1313 sorry, I've been occupied but I will review soon later this week.

.github/workflows/run-tests.yml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
.github/workflows/run-tests.yml Outdated Show resolved Hide resolved
tests/unit/copyTemplate.test.js Show resolved Hide resolved
.github/workflows/run-tests.yml Outdated Show resolved Hide resolved
@shazron
Copy link
Member

shazron commented Dec 2, 2023

You can check the result of the workflow runs: no coverage files were generated. Please add the right flags to generate them so codecov can parse them.

@Rachit1313
Copy link
Author

Hi @shazron ,
This is ready for review.

Copy link

codecov bot commented Jan 20, 2024

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

@shazron
Copy link
Member

shazron commented Jan 20, 2024

The code changes are ok, but coverage is only 37.25% according to Codecov. The threshold for all our repos is 100%: https://github.com/adobe/aio-cli-plugin-app/blob/f27eaafad21231a9288660c8f67c2860d2b2c304/jest.config.js#L26-L31

Copy link
Member

@shazron shazron left a comment

Choose a reason for hiding this comment

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

Coverage must be 100%

@shazron
Copy link
Member

shazron commented Feb 26, 2024

closing, incomplete. we will proceed with our own tests

@shazron shazron closed this Feb 26, 2024
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.

None yet

2 participants