We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TestResults.OutputEncoding configuration option is ignored. XML delcaration is hardcoded to utf-8 and file is written in default encoding.
TestResults.OutputEncoding
Configuration option should be properly typed to valid encodings and be effective.
$c = New-PesterConfiguration $c.Run.ScriptBlock = { Describe 'd' { It 'i' { } } } $c.TestResult.Enabled = $true $c.TestResult.OutputFormat = 'NUnit3' $c.TestResult.OutputEncoding = 'utf-16' $c.TestResult.TestSuiteName = 'TestResult.OutputEncoding Demo' $c.TestResult.OutputPath = "./demoOutputEncoding.xml" $c.Output.Verbosity = 'Detailed' Invoke-Pester -Configuration $c
demoOutputEncoding.xml is written in UTF-8 and incldues encoding="utf-8".
encoding="utf-8"
Pester version : 5.6.0-beta1 /workspaces/Pester/bin/Pester.psm1 PowerShell version : 7.4.1 OS version : Unix 5.15.133.1
Improve type or early validation for configuration option to only allow valid encodings. Then pass it to Encoding-option here:
Encoding
Pester/src/functions/TestResults.ps1
Lines 169 to 172 in 93c6610
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Checklist
What is the issue?
TestResults.OutputEncoding
configuration option is ignored. XML delcaration is hardcoded to utf-8 and file is written in default encoding.Expected Behavior
Configuration option should be properly typed to valid encodings and be effective.
Steps To Reproduce
demoOutputEncoding.xml is written in UTF-8 and incldues
encoding="utf-8"
.Describe your environment
Pester version : 5.6.0-beta1 /workspaces/Pester/bin/Pester.psm1
PowerShell version : 7.4.1
OS version : Unix 5.15.133.1
Possible Solution?
Improve type or early validation for configuration option to only allow valid encodings. Then pass it to
Encoding
-option here:Pester/src/functions/TestResults.ps1
Lines 169 to 172 in 93c6610
The text was updated successfully, but these errors were encountered: