@@ -28,10 +28,10 @@ describe("UpdatePowerShell feature", function () {
2828 it ( "Won't check if 'promptToUpdatePowerShell' is false" , function ( ) {
2929 settings . promptToUpdatePowerShell = false ;
3030 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" ,
3535 } ;
3636 const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
3737 // @ts -expect-error method is private.
@@ -40,10 +40,10 @@ describe("UpdatePowerShell feature", function () {
4040
4141 it ( "Won't check for Windows PowerShell" , function ( ) {
4242 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" ,
4747 } ;
4848 const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
4949 // @ts -expect-error method is private.
@@ -52,10 +52,10 @@ describe("UpdatePowerShell feature", function () {
5252
5353 it ( "Won't check for a development build of PowerShell" , function ( ) {
5454 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" ,
5959 } ;
6060 const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
6161 // @ts -expect-error method is private.
@@ -64,10 +64,10 @@ describe("UpdatePowerShell feature", function () {
6464
6565 it ( "Won't check for a daily build of PowerShell" , function ( ) {
6666 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" ,
7171 } ;
7272 const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
7373 // @ts -expect-error method is private.
@@ -77,22 +77,22 @@ describe("UpdatePowerShell feature", function () {
7777 it ( "Won't check if POWERSHELL_UPDATECHECK is 'Off'" , function ( ) {
7878 process . env . POWERSHELL_UPDATECHECK = "Off" ;
7979 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" ,
8484 } ;
8585 const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
8686 // @ts -expect-error method is private.
8787 assert ( ! updater . shouldCheckForUpdate ( ) ) ;
8888 } ) ;
8989
90- it ( "Should otherwise check to update PowerShell" , function ( ) {
90+ it ( "Should otherwise check to update PowerShell" , function ( ) {
9191 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" ,
9696 } ;
9797 const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
9898 // @ts -expect-error method is private.
@@ -101,34 +101,34 @@ describe("UpdatePowerShell feature", function () {
101101 } ) ;
102102
103103 describe ( "Which version it gets" , function ( ) {
104- it ( "Would update to LTS" , async function ( ) {
104+ it ( "Would update to LTS" , async function ( ) {
105105 process . env . POWERSHELL_UPDATECHECK = "LTS" ;
106106 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" ,
111111 } ;
112112 const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
113113 // @ts -expect-error method is private.
114- const tag : string = await updater . maybeGetNewRelease ( ) ?? "" ;
114+ const tag : string = ( await updater . maybeGetNewRelease ( ) ) ?? "" ;
115115 // NOTE: This will need to be updated each time an LTS is released.
116116 // 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" ) ) ;
118118 } ) ;
119119
120- it ( "Would update to stable" , async function ( ) {
120+ it ( "Would update to stable" , async function ( ) {
121121 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" ,
126126 } ;
127127 const updater = new UpdatePowerShell ( settings , testLogger , version ) ;
128128 // @ts -expect-error method is private.
129129 const tag : string | undefined = await updater . maybeGetNewRelease ( ) ;
130130 // NOTE: This will need to be updated each new major stable.
131- assert ( tag ?. startsWith ( "v7.4 " ) ) ;
131+ assert ( tag ?. startsWith ( "v7.5 " ) ) ;
132132 } ) ;
133133 } ) ;
134134} ) ;
0 commit comments