Functions/Get-Puppeteer_TakeScreenshot.Tests.ps1
describe "BitTitan.Runbooks.UIAutomation/Get-Puppeteer_TakeScreenshot" -Tag "module", "unit" { # Import the function to test . "$($PSScriptRoot)\Get-Puppeteer_TakeScreenshot.ps1" it "returns the code for taking a screenshot of a browser page" { # Call the function $output = Get-Puppeteer_TakeScreenshot -FilePath "screenshot.jpeg" # Verify the output $output | Should Be "await page.screenshot({ 'path': 'screenshot.jpeg', 'quality': 50 })" } } |