This closes #2921 by switching ReSharper to the XML API used by Powershell, and refactors the powershell code back into the common nuget v2 service class. It also removes mocked tests of the color logic, replacing them with smaller-bracket tests that accomplish the same thing more concisely.
43 lines
779 B
JavaScript
43 lines
779 B
JavaScript
'use strict'
|
|
|
|
const queryIndex = JSON.stringify({
|
|
resources: [
|
|
{
|
|
'@id': 'https://api-v2v3search-0.nuget.org/query',
|
|
'@type': 'SearchQueryService',
|
|
},
|
|
],
|
|
})
|
|
|
|
const nuGetV3VersionJsonWithDash = JSON.stringify({
|
|
data: [
|
|
{
|
|
totalDownloads: 0,
|
|
versions: [{ version: '1.2-beta' }],
|
|
},
|
|
],
|
|
})
|
|
const nuGetV3VersionJsonFirstCharZero = JSON.stringify({
|
|
data: [
|
|
{
|
|
totalDownloads: 0,
|
|
versions: [{ version: '0.35' }],
|
|
},
|
|
],
|
|
})
|
|
const nuGetV3VersionJsonFirstCharNotZero = JSON.stringify({
|
|
data: [
|
|
{
|
|
totalDownloads: 0,
|
|
versions: [{ version: '1.2.7' }],
|
|
},
|
|
],
|
|
})
|
|
|
|
module.exports = {
|
|
queryIndex,
|
|
nuGetV3VersionJsonWithDash,
|
|
nuGetV3VersionJsonFirstCharZero,
|
|
nuGetV3VersionJsonFirstCharNotZero,
|
|
}
|