Skip to content

Commit 7de110f

Browse files
🪲 [Fix]: Update test to adjust output rendering (#10)
## Description This pull request includes a small change to the `tests/Markdown.Tests.ps1` file. The change configures the PowerShell output rendering style before and after running tests to ensure consistent output formatting. This to ensure that comparison can be done without counting in rendering. * Added `BeforeAll` block to set `$PSStyle.OutputRendering` to 'Host' before tests run. * Added `AfterAll` block to reset `$PSStyle.OutputRendering` to 'Ansi' after tests complete. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [x] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 00fb1f7 commit 7de110f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/Markdown.Tests.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
[CmdletBinding()]
1010
param()
1111

12+
BeforeAll {
13+
$PSStyle.OutputRendering = 'Host'
14+
}
15+
1216
Describe 'Module' {
1317
Context 'Set-MarkdownSection' {
1418
It 'Can render a #2 heading with a paragraph' {
@@ -245,3 +249,7 @@ This is the end of the document
245249
}
246250
}
247251
}
252+
253+
AfterAll {
254+
$PSStyle.OutputRendering = 'Ansi'
255+
}

0 commit comments

Comments
 (0)