@@ -129,9 +129,9 @@ Describe 'Coverage gaps for release and git internals' {
129129 }
130130 }
131131
132- It ' Get-NovaVersionUpdatePlan appends a preview label to the normal bump target when preview mode starts from stable ' - ForEach @ (
133- @ {CurrentVersion = ' 1.5.3' ; Label = ' Major' ; ExpectedVersion = ' 2.0.0 -preview' }
134- @ {CurrentVersion = ' 1.5.3' ; Label = ' Minor' ; ExpectedVersion = ' 1.6.0 -preview' }
132+ It ' Get-NovaVersionUpdatePlan enters the next patch preview track from stable versions regardless of the inferred label ' - ForEach @ (
133+ @ {CurrentVersion = ' 1.5.3' ; Label = ' Major' ; ExpectedVersion = ' 1.5.4 -preview' }
134+ @ {CurrentVersion = ' 1.5.3' ; Label = ' Minor' ; ExpectedVersion = ' 1.5.4 -preview' }
135135 @ {CurrentVersion = ' 1.5.3' ; Label = ' Patch' ; ExpectedVersion = ' 1.5.4-preview' }
136136 ) {
137137 InModuleScope $script :moduleName - Parameters @ {TestCase = $_ } {
@@ -170,14 +170,14 @@ Describe 'Coverage gaps for release and git internals' {
170170 ExpectedPlanLabel = ' Minor'
171171 }
172172 @ {
173- Name = ' preview mode remains unchanged '
173+ Name = ' preview mode enters the next patch preview from stable major-zero versions '
174174 CurrentVersion = ' 0.1.0'
175175 Label = ' Major'
176176 PreviewRelease = $true
177- PlannedVersion = ' 1.0.0 -preview'
178- ExpectedEffectiveLabel = ' Major '
177+ PlannedVersion = ' 0.1.1 -preview'
178+ ExpectedEffectiveLabel = ' Patch '
179179 ExpectedAdvisoryPattern = $null
180- ExpectedPlanLabel = ' Major '
180+ ExpectedPlanLabel = ' Patch '
181181 }
182182 ) {
183183 InModuleScope $script :moduleName - Parameters @ {TestCase = $_ } {
@@ -284,9 +284,9 @@ Describe 'Coverage gaps for release and git internals' {
284284 $updatedProject = Get-Content - LiteralPath $projectJsonPath - Raw | ConvertFrom-Json
285285
286286 $result.PreviousVersion | Should - Be ' 1.2.3'
287- $result.NewVersion | Should - Be ' 1.3.0 -preview'
287+ $result.NewVersion | Should - Be ' 1.2.4 -preview'
288288 $result.Applied | Should - BeTrue
289- $updatedProject.Version | Should - Be ' 1.3.0 -preview'
289+ $updatedProject.Version | Should - Be ' 1.2.4 -preview'
290290 $updatedProject.Package.Auth.HeaderName | Should - Be ' Authorization'
291291 $updatedProject.Package.Repositories.Count | Should - Be 1
292292 ($updatedProject.Package.Repositories [0 ] -is [string ]) | Should - BeFalse
@@ -301,7 +301,7 @@ Describe 'Coverage gaps for release and git internals' {
301301 Mock Get-NovaVersionUpdatePlan {
302302 [pscustomobject ]@ {
303303 ProjectFile = ' /tmp/project.json'
304- NewVersion = [semver ]' 1.3.0 -preview'
304+ NewVersion = [semver ]' 1.2.4 -preview'
305305 }
306306 }
307307 Mock Read-ProjectJsonData {
@@ -322,12 +322,12 @@ Describe 'Coverage gaps for release and git internals' {
322322
323323 $result.ProjectFile | Should - Be ' /tmp/project.json'
324324 $result.PreviousVersion | Should - Be ' 1.2.3'
325- $result.NewVersion | Should - Be ' 1.3.0 -preview'
325+ $result.NewVersion | Should - Be ' 1.2.4 -preview'
326326 $result.Applied | Should - BeTrue
327327 Assert-MockCalled Read-ProjectJsonData - Times 1 - ParameterFilter {$ProjectJsonPath -eq ' /tmp/project.json' }
328328 Assert-MockCalled Write-ProjectJsonData - Times 1 - ParameterFilter {
329329 $ProjectJsonPath -eq ' /tmp/project.json' -and
330- $Data.Version -eq ' 1.3.0 -preview' -and
330+ $Data.Version -eq ' 1.2.4 -preview' -and
331331 $Data.Package.Repositories [0 ].Name -eq ' staging'
332332 }
333333 }
@@ -338,7 +338,7 @@ Describe 'Coverage gaps for release and git internals' {
338338 Mock Get-NovaVersionUpdatePlan {
339339 [pscustomobject ]@ {
340340 ProjectFile = ' /tmp/project.json'
341- NewVersion = [semver ]' 1.3.0 -preview'
341+ NewVersion = [semver ]' 1.2.4 -preview'
342342 }
343343 }
344344 Mock Read-ProjectJsonData {
@@ -352,7 +352,7 @@ Describe 'Coverage gaps for release and git internals' {
352352
353353 $result.ProjectFile | Should - Be ' /tmp/project.json'
354354 $result.PreviousVersion | Should - Be ' 1.2.3'
355- $result.NewVersion | Should - Be ' 1.3.0 -preview'
355+ $result.NewVersion | Should - Be ' 1.2.4 -preview'
356356 $result.Applied | Should - BeFalse
357357 Assert-MockCalled Read-ProjectJsonData - Times 1 - ParameterFilter {$ProjectJsonPath -eq ' /tmp/project.json' }
358358 Assert-MockCalled Write-ProjectJsonData - Times 0
0 commit comments