Skip to content

Commit eb6f220

Browse files
committed
Add tests
1 parent e02a266 commit eb6f220

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

test/Get-LockFile.Tests.ps1

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#Requires -Modules LockFile
2+
3+
Describe 'Get-LockFile' {
4+
BeforeAll {
5+
Set-LockFile -Path TestDrive:\lock.json
6+
}
7+
8+
It 'returns results' {
9+
Get-LockFile -Path TestDrive:\lock.json |
10+
Should -Not -BeNullOrEmpty
11+
}
12+
}

test/Set-LockFile.Tests.ps1

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#Requires -Modules LockFile
2+
3+
Describe 'Set-LockFile' {
4+
AfterAll {
5+
Remove-Item TestDrive:\lock.json
6+
}
7+
8+
It 'returns results' {
9+
Set-LockFile -Path TestDrive:\lock.json -PassThru |
10+
Should -Not -BeNullOrEmpty
11+
}
12+
}

test/Test-LockFile.Tests.ps1

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#Requires -Modules LockFile
2+
3+
Describe 'Test-LockFile' {
4+
BeforeAll {
5+
Set-LockFile -Path TestDrive:\lock.json
6+
}
7+
8+
It 'returns true' {
9+
Test-LockFile -Path TestDrive:\lock.json |
10+
Should -BeTrue
11+
}
12+
}

0 commit comments

Comments
 (0)