Clean up Pester tests
This commit is contained in:
16
Tests/Classes/MonitoredScript.Tests.ps1
Normal file
16
Tests/Classes/MonitoredScript.Tests.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
InModuleScope Chronometer {
|
||||
|
||||
Describe "Class: MonitoredScript" -Tag Build {
|
||||
|
||||
It "Creates an object" {
|
||||
{[MonitoredScript]::New()} | Should Not Throw
|
||||
}
|
||||
|
||||
It "SetScript()" {
|
||||
|
||||
$monitor = [MonitoredScript]::New()
|
||||
{$monitor.SetScript("$PSScriptRoot\..\..\scratchfiles\example.ps1")} | Should Not Throw
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
16
Tests/Classes/ScriptLine.Tests.ps1
Normal file
16
Tests/Classes/ScriptLine.Tests.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
InModuleScope Chronometer {
|
||||
Describe "Class: ScriptLine" -Tag Build {
|
||||
|
||||
It "Creates an Object" {
|
||||
{[ScriptLine]::New()} | Should Not Throw
|
||||
}
|
||||
|
||||
It "ToString()" {
|
||||
{[ScriptLine]::New().toString()} | Should Not Throw
|
||||
}
|
||||
|
||||
It "Creates an Object" {
|
||||
{[ScriptLine]::New().AddExecutionTime(1)} | Should Not Throw
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Tests/Classes/ScriptProfiler.Tests.ps1
Normal file
13
Tests/Classes/ScriptProfiler.Tests.ps1
Normal file
@@ -0,0 +1,13 @@
|
||||
InModuleScope Chronometer {
|
||||
|
||||
Describe "Class: ScriptProfiler" -Tag Build {
|
||||
|
||||
It "Creates an Object" {
|
||||
{[ScriptProfiler]::New()} | Should Not Throw
|
||||
}
|
||||
|
||||
It "Start()" {
|
||||
{[ScriptProfiler]::Start()} | Should Not Throw
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user