Module to integrate PowerShell Pester into ISE
PowerShell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitattributes
.gitignore
ChocolateyInstall.ps1
IsePester.1.0.0.nupkg
IsePester.1.0.1.nupkg
IsePester.nuspec
IsePester.psm1
README.md
RunningPesterInISE.png

README.md

#Getting Started

You also need Pester installed https://github.com/pester/Pester

Copy .\IsePester.psm1 $env:USERPROFILE\Documents\WindowsPowerShell\Modules\IsePester

Launch ISE

Run or add this to your ISE $Profile Import-Module Pester, IsePester

#Using IsePester

Once the module is loaded, you can run Pester against a new test script by pressing Ctrl+F5 or navigate to Add-ons|Pester.

You can use IsePester to run a saved script file loaded into ISE. It muset be named to Pester conventions.

e.g. Mytest.Tests.ps1

##Sample Test

Describe 'Try Pester' {
    It 'tests a fail' { 1/0 }
    It 'tests a pass' { $true.should.be($true) }
}

alt-text

Feature

Ian Davis suggested, when working on foo.ps1 with tests in foo.tests.ps1 in the same directory, triggering the Pester shortcut while in foo.ps1, the tool should look for foo.tests.ps1 and run it if it exists; otherwise, run the current file.

This is now implemented.