@@ -28,10 +28,10 @@ describe("UpdatePowerShell feature", function () {
28
28
it ( "Won't check if 'promptToUpdatePowerShell' is false" , function ( ) {
29
29
settings . promptToUpdatePowerShell = false ;
30
30
const version : IPowerShellVersionDetails = {
31
- " version" : "7.3.0" ,
32
- " edition" : "Core" ,
33
- " commit" : "7.3.0" ,
34
- " architecture" : "X64"
31
+ version : "7.3.0" ,
32
+ edition : "Core" ,
33
+ commit : "7.3.0" ,
34
+ architecture : "X64" ,
35
35
} ;
36
36
const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
37
37
// @ts -expect-error method is private.
@@ -40,10 +40,10 @@ describe("UpdatePowerShell feature", function () {
40
40
41
41
it ( "Won't check for Windows PowerShell" , function ( ) {
42
42
const version : IPowerShellVersionDetails = {
43
- " version" : "5.1.22621" ,
44
- " edition" : "Desktop" ,
45
- " commit" : "5.1.22621" ,
46
- " architecture" : "X64"
43
+ version : "5.1.22621" ,
44
+ edition : "Desktop" ,
45
+ commit : "5.1.22621" ,
46
+ architecture : "X64" ,
47
47
} ;
48
48
const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
49
49
// @ts -expect-error method is private.
@@ -52,10 +52,10 @@ describe("UpdatePowerShell feature", function () {
52
52
53
53
it ( "Won't check for a development build of PowerShell" , function ( ) {
54
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"
55
+ version : "7.3.0-preview.3" ,
56
+ edition : "Core" ,
57
+ commit : "7.3.0-preview.3-508-g07175ae0ff8eb7306fe0b0fc7d19bdef4fbf2d67" ,
58
+ architecture : "Arm64" ,
59
59
} ;
60
60
const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
61
61
// @ts -expect-error method is private.
@@ -64,10 +64,10 @@ describe("UpdatePowerShell feature", function () {
64
64
65
65
it ( "Won't check for a daily build of PowerShell" , function ( ) {
66
66
const version : IPowerShellVersionDetails = {
67
- " version" : "7.3.0-daily20221206.1" ,
68
- " edition" : "Core" ,
69
- " commit" : "7.3.0-daily20221206.1" ,
70
- " architecture" : "Arm64"
67
+ version : "7.3.0-daily20221206.1" ,
68
+ edition : "Core" ,
69
+ commit : "7.3.0-daily20221206.1" ,
70
+ architecture : "Arm64" ,
71
71
} ;
72
72
const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
73
73
// @ts -expect-error method is private.
@@ -77,22 +77,22 @@ describe("UpdatePowerShell feature", function () {
77
77
it ( "Won't check if POWERSHELL_UPDATECHECK is 'Off'" , function ( ) {
78
78
process . env . POWERSHELL_UPDATECHECK = "Off" ;
79
79
const version : IPowerShellVersionDetails = {
80
- " version" : "7.3.0" ,
81
- " edition" : "Core" ,
82
- " commit" : "7.3.0" ,
83
- " architecture" : "X64"
80
+ version : "7.3.0" ,
81
+ edition : "Core" ,
82
+ commit : "7.3.0" ,
83
+ architecture : "X64" ,
84
84
} ;
85
85
const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
86
86
// @ts -expect-error method is private.
87
87
assert ( ! updater . shouldCheckForUpdate ( ) ) ;
88
88
} ) ;
89
89
90
- it ( "Should otherwise check to update PowerShell" , function ( ) {
90
+ it ( "Should otherwise check to update PowerShell" , function ( ) {
91
91
const version : IPowerShellVersionDetails = {
92
- " version" : "7.3.0" ,
93
- " edition" : "Core" ,
94
- " commit" : "7.3.0" ,
95
- " architecture" : "X64"
92
+ version : "7.3.0" ,
93
+ edition : "Core" ,
94
+ commit : "7.3.0" ,
95
+ architecture : "X64" ,
96
96
} ;
97
97
const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
98
98
// @ts -expect-error method is private.
@@ -101,34 +101,34 @@ describe("UpdatePowerShell feature", function () {
101
101
} ) ;
102
102
103
103
describe ( "Which version it gets" , function ( ) {
104
- it ( "Would update to LTS" , async function ( ) {
104
+ it ( "Would update to LTS" , async function ( ) {
105
105
process . env . POWERSHELL_UPDATECHECK = "LTS" ;
106
106
const version : IPowerShellVersionDetails = {
107
- " version" : "7.0 .0" ,
108
- " edition" : "Core" ,
109
- " commit" : "7.0 .0" ,
110
- " architecture" : "X64"
107
+ version : "7.2 .0" ,
108
+ edition : "Core" ,
109
+ commit : "7.2 .0" ,
110
+ architecture : "X64" ,
111
111
} ;
112
112
const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
113
113
// @ts -expect-error method is private.
114
- const tag : string = await updater . maybeGetNewRelease ( ) ?? "" ;
114
+ const tag : string = ( await updater . maybeGetNewRelease ( ) ) ?? "" ;
115
115
// NOTE: This will need to be updated each time an LTS is released.
116
116
// Also sometimes the prior LTS is more recently updated than the latest LTS.
117
- assert ( tag . startsWith ( "v7.4" ) || tag . startsWith ( "v7.2" ) ) ;
117
+ assert ( tag . startsWith ( "v7.4" ) ) ;
118
118
} ) ;
119
119
120
- it ( "Would update to stable" , async function ( ) {
120
+ it ( "Would update to stable" , async function ( ) {
121
121
const version : IPowerShellVersionDetails = {
122
- " version" : "7.3.0" ,
123
- " edition" : "Core" ,
124
- " commit" : "7.3.0" ,
125
- " architecture" : "X64"
122
+ version : "7.3.0" ,
123
+ edition : "Core" ,
124
+ commit : "7.3.0" ,
125
+ architecture : "X64" ,
126
126
} ;
127
127
const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
128
128
// @ts -expect-error method is private.
129
129
const tag : string | undefined = await updater . maybeGetNewRelease ( ) ;
130
130
// NOTE: This will need to be updated each new major stable.
131
- assert ( tag ?. startsWith ( "v7.4 " ) ) ;
131
+ assert ( tag ?. startsWith ( "v7.5 " ) ) ;
132
132
} ) ;
133
133
} ) ;
134
134
} ) ;
0 commit comments