Updated testing methodology to not create test scripts and just test in main code.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user