Skip to content

Commit

Permalink
Refactor nuget.tester.js to remove unnecessary version tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jNullj committed Oct 24, 2024
1 parent 8ebee4b commit b951271
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions services/nuget/nuget.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
} from '../test-validators.js'
import {
queryIndex,
nuGetV3VersionJsonWithDash,
nuGetV3VersionJsonFirstCharZero,
nuGetV3VersionJsonFirstCharNotZero,
nuGetV3VersionJsonBuildMetadataWithDash,
Expand Down Expand Up @@ -51,24 +50,6 @@ t.create('version (valid)')
message: isVPlusDottedVersionNClauses,
})

t.create('version (yellow badge)')
.get('/v/Microsoft.AspNetCore.Mvc.json')
.intercept(nock =>
nock('https://api.nuget.org').get('/v3/index.json').reply(200, queryIndex),
)
.intercept(nock =>
nock('https://api-v2v3search-0.nuget.org')
.get(
'/query?q=packageid%3Amicrosoft.aspnetcore.mvc&prerelease=true&semVerLevel=2',
)
.reply(200, nuGetV3VersionJsonWithDash),
)
.expectBadge({
label: 'nuget',
message: 'v1.2-beta',
color: 'orange',
})

t.create('version (orange badge)')
.get('/v/Microsoft.AspNetCore.Mvc.json')
.intercept(nock =>
Expand Down Expand Up @@ -149,24 +130,6 @@ t.create('version (pre) (valid)')
message: isVPlusDottedVersionNClausesWithOptionalSuffix,
})

t.create('version (pre) (yellow badge)')
.get('/vpre/Microsoft.AspNetCore.Mvc.json')
.intercept(nock =>
nock('https://api.nuget.org').get('/v3/index.json').reply(200, queryIndex),
)
.intercept(nock =>
nock('https://api-v2v3search-0.nuget.org')
.get(
'/query?q=packageid%3Amicrosoft.aspnetcore.mvc&prerelease=true&semVerLevel=2',
)
.reply(200, nuGetV3VersionJsonWithDash),
)
.expectBadge({
label: 'nuget',
message: 'v1.2-beta',
color: 'orange',
})

t.create('version (pre) (orange badge)')
.get('/vpre/Microsoft.AspNetCore.Mvc.json')
.intercept(nock =>
Expand Down

0 comments on commit b951271

Please sign in to comment.