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

Improve testing #9

Merged
merged 16 commits into from
Dec 22, 2023
Merged

Improve testing #9

merged 16 commits into from
Dec 22, 2023

Conversation

dalejo96
Copy link
Collaborator

I have added some tests for the different util functions and the semantic-release functions too.
Unit

  • postReleaseCandidate
  • readAndWriteNewCabal

Integration

  • verifyConditions
  • prepare

Please review.

I am facing something weird here:
image
The test related to the prepare step: throws an error when next release is not defined is not throwing an error even when reaching this part of the code:

if (!version) {
    throw new Error("Could not determine the version from semantic release. Check the plugin configuration");
  }

I already tested this using console.logs but no matter what I do the test is not throwing, I am skipping that test for now
Do you have any idea @JoseLion ?

Copy link
Member

@JoseLion JoseLion left a comment

Choose a reason for hiding this comment

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

Nice work! I left a few suggestions. Let me know if you have any questions 🙂

.mocharc.json Outdated Show resolved Hide resolved
src/prepare.ts Outdated Show resolved Hide resolved
src/publish.ts Outdated Show resolved Hide resolved
src/publish.ts Outdated Show resolved Hide resolved
test/integration/prepare.test.ts Outdated Show resolved Hide resolved
test/integration/prepare.test.ts Outdated Show resolved Hide resolved
test/unit/prepare.test.ts Outdated Show resolved Hide resolved
test/unit/publish.test..ts Outdated Show resolved Hide resolved
test/utils.ts Outdated Show resolved Hide resolved
Copy link
Member

@JoseLion JoseLion left a comment

Choose a reason for hiding this comment

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

🚀

@dalejo96 dalejo96 merged commit f581329 into main Dec 22, 2023
3 checks passed
@dalejo96 dalejo96 deleted the improve-testing branch December 22, 2023 20:28
Copy link

github-actions bot commented Feb 6, 2024

🎉 This PR is included in version 1.0.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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants