Functions/Get-Puppeteer_DeclareVariable.Tests.ps1
describe "BitTitan.Runbooks.UIAutomation/Get-Puppeteer_DeclareVariable" -Tag "module", "unit" { # Import the function to test . "$($PSScriptRoot)\Get-Puppeteer_DeclareVariable.ps1" it "returns the code for declaring a non-const variable" { # Call the function $output = Get-Puppeteer_DeclareVariable -Name "answer" -Value "42" -Const:$false # Verify the output $output | Should Be "answer = 42;" } it "returns the code for declaring a const variable" { # Call the function $output = Get-Puppeteer_DeclareVariable -Name "answer" -Value "42" -Const # Verify the output $output | Should Be "const answer = 42;" } } |