Public Function Tests

This directory contains unit tests for public (exported) JiraPS functions.

Test Pattern

All tests in this directory follow the CRUD function pattern for public (exported) JiraPS functions.

When to Use

Use this template for functions that:

Template Location

See .template.ps1 for the standard test structure.

Reference Example

See Add-JiraFilterPermission.Unit.Tests.ps1 for a complete, working example.

Test Structure

Public function tests are organized into three main sections:

1. Signature Tests

Verify function parameters, types, default values, and mandatory status to ensure the function interface remains stable.

2. Behavior Tests

Test the actual functionality including:

3. Input Validation Tests

Test parameter sets and input handling:

Mock Debugging

To debug mock parameter values, uncomment this line in the test’s BeforeAll block:

$VerbosePreference = 'Continue'

Then mocks using Write-MockDebugInfo will display their parameter values during test execution.

Key Differences from Private Tests

Unlike converter tests in Tests/Functions/Private/: