@@ -27,8 +27,8 @@ describe("UpdatePowerShell feature", function () {
27
27
process . env . POWERSHELL_UPDATECHECK = "Default" ;
28
28
const version : IPowerShellVersionDetails = {
29
29
"version" : "7.3.0" ,
30
- "displayVersion" : "7.3" ,
31
30
"edition" : "Core" ,
31
+ "commit" : "7.3.0" ,
32
32
"architecture" : "X64"
33
33
} ;
34
34
// @ts -expect-error testing doesn't require all arguments.
@@ -39,10 +39,9 @@ describe("UpdatePowerShell feature", function () {
39
39
40
40
it ( "Won't check for Windows PowerShell" , function ( ) {
41
41
const version : IPowerShellVersionDetails = {
42
- // TODO: This should handle e.g. 5.1.22621.436
43
- "version" : "5.1.0" ,
44
- "displayVersion" : "5.1" ,
42
+ "version" : "5.1.22621" ,
45
43
"edition" : "Desktop" ,
44
+ "commit" : "5.1.22621" ,
46
45
"architecture" : "X64"
47
46
} ;
48
47
// @ts -expect-error testing doesn't require all arguments.
@@ -51,12 +50,25 @@ describe("UpdatePowerShell feature", function () {
51
50
assert ( ! updater . shouldCheckForUpdate ( ) ) ;
52
51
} ) ;
53
52
53
+ it ( "Won't check for a development build of PowerShell" , function ( ) {
54
+ const version : IPowerShellVersionDetails = {
55
+ "version" : "7.3.0-preview.3" ,
56
+ "edition" : "Core" ,
57
+ "commit" : "7.3.0-preview.3-508-g07175ae0ff8eb7306fe0b0fc7d19bdef4fbf2d67" ,
58
+ "architecture" : "Arm64"
59
+ } ;
60
+ // @ts -expect-error testing doesn't require all arguments.
61
+ const updater = new UpdatePowerShell ( undefined , settings , testLogger , version ) ;
62
+ // @ts -expect-error method is private.
63
+ assert ( ! updater . shouldCheckForUpdate ( ) ) ;
64
+ } ) ;
65
+
54
66
it ( "Won't check if POWERSHELL_UPDATECHECK is 'Off'" , function ( ) {
55
67
process . env . POWERSHELL_UPDATECHECK = "Off" ;
56
68
const version : IPowerShellVersionDetails = {
57
69
"version" : "7.3.0" ,
58
- "displayVersion" : "7.3" ,
59
70
"edition" : "Core" ,
71
+ "commit" : "7.3.0" ,
60
72
"architecture" : "X64"
61
73
} ;
62
74
// @ts -expect-error testing doesn't require all arguments.
@@ -69,8 +81,8 @@ describe("UpdatePowerShell feature", function () {
69
81
process . env . POWERSHELL_UPDATECHECK = "Default" ;
70
82
const version : IPowerShellVersionDetails = {
71
83
"version" : "7.3.0" ,
72
- "displayVersion" : "7.3" ,
73
84
"edition" : "Core" ,
85
+ "commit" : "7.3.0" ,
74
86
"architecture" : "X64"
75
87
} ;
76
88
// @ts -expect-error testing doesn't require all arguments.
@@ -85,8 +97,8 @@ describe("UpdatePowerShell feature", function () {
85
97
process . env . POWERSHELL_UPDATECHECK = "LTS" ;
86
98
const version : IPowerShellVersionDetails = {
87
99
"version" : "7.0.0" ,
88
- "displayVersion" : "7.0" ,
89
100
"edition" : "Core" ,
101
+ "commit" : "7.0.0" ,
90
102
"architecture" : "X64"
91
103
} ;
92
104
// @ts -expect-error testing doesn't require all arguments.
@@ -100,8 +112,8 @@ describe("UpdatePowerShell feature", function () {
100
112
it ( "Would update to stable" , async function ( ) {
101
113
const version : IPowerShellVersionDetails = {
102
114
"version" : "7.0.0" ,
103
- "displayVersion" : "7.0" ,
104
115
"edition" : "Core" ,
116
+ "commit" : "7.0.0" ,
105
117
"architecture" : "X64"
106
118
} ;
107
119
// @ts -expect-error testing doesn't require all arguments.
0 commit comments