Updated testing methodology to not create test scripts and just test in main code.

This commit is contained in:
2026-03-10 17:03:37 -07:00
parent 594c51faea
commit 52b699564e
4 changed files with 6 additions and 23 deletions

View File

@@ -101,18 +101,8 @@ Import-Module "$script:AppRoot\Modules\ProjectName.psm1" -Force
## Testing
- Use **Pester** for unit testing
- Always provide a Pester test file alongside new functions
- At minimum, test: happy path, expected failure cases, and edge cases
- Run tests with: `Invoke-Pester -Path .\Tests\ -Output Detailed`
```powershell
# Tests/Get-UserConfig.Tests.ps1
Describe "Get-UserConfig" {
It "Returns default config when file does not exist" { ... }
It "Loads config from valid .psd1 file" { ... }
}
```
- Do **not** create test files — I'll run the code directly to verify it works
- If asked to write tests, use **Pester** with `Invoke-Pester -Path .\Tests\ -Output Detailed`
## Comments