You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Get-Module BurntToast).ExportedFunctions.Count | Should -Be 25
16
+
(Get-Module BurntToast).ExportedFunctions.Count | Should -Be 20
7
17
}
8
18
9
19
It 'should import aliases' {
10
20
(Get-Module BurntToast).ExportedAliases.Count | Should -Be 1
11
21
}
12
22
}
23
+
24
+
Context 'Importing on Unsupported Operating Systems' {
25
+
It 'throws when importing on operating systems older than Windows 10' {
26
+
$env:BurntToastPesterNotWindows10=$true
27
+
28
+
if (Get-Module-Name 'BurntToast') {
29
+
Remove-Module-Name 'BurntToast'
30
+
}
31
+
32
+
if ($ENV:BURNTTOAST_MODULE_ROOT) {
33
+
{Import-Module$ENV:BURNTTOAST_MODULE_ROOT-Force} | Should -Throw -ExpectedMessage 'This version of BurntToast will only work on Windows 10*'
34
+
} else {
35
+
{Import-Module"$PSScriptRoot/../src/BurntToast.psd1"-Force} | Should -Throw -ExpectedMessage 'This version of BurntToast will only work on Windows 10*'
36
+
}
37
+
}
38
+
39
+
It 'throws when importing on Windows 10 builds older than the Anniversary Update' {
40
+
$env:BurntToastPesterNotAnniversaryUpdate=$true
41
+
42
+
if (Get-Module-Name 'BurntToast') {
43
+
Remove-Module-Name 'BurntToast'
44
+
}
45
+
46
+
if ($ENV:BURNTTOAST_MODULE_ROOT) {
47
+
{Import-Module$ENV:BURNTTOAST_MODULE_ROOT-Force} | Should -Throw -ExpectedMessage 'This version of BurntToast will only work on Windows 10 Creators Update (15063) and above*'
48
+
} else {
49
+
{Import-Module"$PSScriptRoot/../src/BurntToast.psd1"-Force} | Should -Throw -ExpectedMessage 'This version of BurntToast will only work on Windows 10 Creators Update (15063) and above*'
0 commit comments