Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Get-Module Pester | Remove-Module
- Import-Module ./Pester.psd1
- $sb = {
- Add-Dependency {
- Start-Sleep -Seconds 10
- }
- Describe "integration test" {
- BeforeAll {
- Start-Sleep -Seconds 10
- }
- It "test 1" {
- Start-Sleep -Seconds 10
- }
- It "test 2" {
- Start-Sleep -Seconds 10
- }
- }
- }
- $ss = $ExecutionContext.SessionState
- # invoking internal pester function
- # because the Find function is not
- # published (yet)
- (Measure-Command {
- &(Get-Module Pester) {
- param ($SessionState, $ScriptBlock)
- $container = New-BlockContainerObject -ScriptBlock $ScriptBlock
- Find-Test -BlockContainer $container -SessionState $SessionState
- } -SessionState $ss -ScriptBlock $sb
- }).TotalMilliseconds
Add Comment
Please, Sign In to add comment