mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Reorganize tests
- Pester source code moved to `test/Pester`, deleted `ext-src`. - Pester tests (.ps1 files) moved to `test/powershell` - xUnit tests (.cs files) moved to `test/csharp` - Third-party script test moved to `test/shebang`
This commit is contained in:
1 parent
ec08d9f46c
commit
bbebf2f76a
105 files changed
+1
-1
No files matched your search
@@ -0,0 +1,28 @@
|
||||
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
|
||||
Describe "Measure-Command" {
|
||||
|
||||
Context "Validate return types for Measure-Command" {
|
||||
|
||||
It "Should return TimeSpan as the return type" {
|
||||
(Measure-Command { Get-Date }).GetType() | Should Be timespan
|
||||
}
|
||||
}
|
||||
|
||||
Context "Validate that it is executing commands correctly" {
|
||||
|
||||
It "Should return TimeSpan after executing a script" {
|
||||
(Measure-Command { echo hi }).GetType() | Should Be timespan
|
||||
}
|
||||
|
||||
It "Should return TimeSpan after executing a cmdlet" {
|
||||
$pesterscript = "$here/assets/echoscript.ps1"
|
||||
$testfile = "$here/assets/echoscript.ps1"
|
||||
$testcommand = "echo pestertestscript"
|
||||
$testcommand | Add-Content -Path $testfile
|
||||
|
||||
(Measure-Command { $pesterscript }).GetType() | Should Be timespan
|
||||
Remove-Item $testfile
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user