Skip to content

dfinke/IsePester

Repository files navigation

#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.

About

Module to integrate PowerShell Pester into ISE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •