Functions/Get-Puppeteer_ThrowExceptionOnUnhandledRejection.Tests.ps1

describe "BitTitan.Runbooks.UIAutomation/Get-Puppeteer_ThrowExceptionOnUnhandledRejection" -Tag "module", "unit" {

    # Import the function to test
    . "$($PSScriptRoot)\Get-Puppeteer_ThrowExceptionOnUnhandledRejection.ps1"

    it "returns the code for throwing an exception upon encountering an unhandled rejection" {
        # Call the function
        $output = Get-Puppeteer_ThrowExceptionOnUnhandledRejection

        # Verify the output
        $output | Should Be "process.on('unhandledRejection', up => { throw up })"
    }
}