Happy to see you are interested in helping.
We have a comprehensive documentation on how to contribute here: Contributing to AtlassianPS.
For detailed information about writing and debugging tests, see the Testing Guide.
Key highlights:
- JiraPS uses Pester 6.2.0 through 6.x for unit testing
- All tests follow a consistent structure with Context blocks
- Test organization: Tests mirror the module structure
Tests/Functions/Public/- Public CRUD functionsTests/Functions/Private/- Private converter functions
- Mock debugging: Uncomment
$VerbosePreference = 'Continue'in BeforeAll to see mock parameter values - Templates: Use
.template.ps1in the appropriate directory as a starting point
When adding tests for a new function:
-
Public functions (Get-, Set-, New-*, etc.): Create in
Tests/Functions/Public/- Use
Tests/Functions/Public/.template.ps1 - See
Add-JiraFilterPermission.Unit.Tests.ps1for reference
- Use
-
Private converter functions (ConvertTo-, ConvertFrom-): Create in
Tests/Functions/Private/- Use
Tests/Functions/Private/.template.ps1 - See
ConvertTo-JiraAttachment.Unit.Tests.ps1for reference
- Use
Here is the gist of it once you have forked the repository:
- before changing the code
git clone https://github.com/<YOUR GITHUB USER>/JiraPS
cd JiraPS
git checkout -b <NAME FOR YOUR FEATURE>
code .- after making the changes
git add .
git commit -m "<A MESSAGE ABOUT THE CHANGES>"
git push