Select Git revision
-
Christoph Witzko authoredChristoph Witzko authored
This project manages its dependencies using Go Modules.
Learn more
index.spec.ts 11.53 KiB
import fs from 'fs';
import * as globalCache from '../../util/cache/global';
import * as runCache from '../../util/cache/run';
import _got from '../../util/got';
import * as _hostRules from '../../util/host-rules';
import * as nuget from '.';
const hostRules: any = _hostRules;
jest.mock('../../util/got');
jest.mock('../../util/host-rules');
const got: any = _got;
const pkgListV3 = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/nunitV3.json',
'utf8'
);
const pkgListV3WithoutProkjectUrl = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/nunitV3_withoutProjectUrl.json',
'utf8'
);
const pkgListV3NoGitHubProjectUrl = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/nunitV3_noGitHubProjectUrl.json',
'utf8'
);
const pkgListV3PrivateFeed = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/nunitV3_privateFeed.json',
'utf8'
);
const pkgInfoV3FromNuget = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/nunitv3_nuget-org.xml',
'utf8'
);
const pkgListV2 = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/nunitV2.xml',
'utf8'
);
const pkgListV2NoGitHubProjectUrl = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/nunitV2_noGitHubProjectUrl.xml',
'utf8'
);
const pkgListV2NoRelease = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/nunitV2_no_release.xml',
'utf8'
);
const pkgListV2WithoutProjectUrl = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/nunitV2_withoutProjectUrl.xml',
'utf8'
);
const pkgListV2Page1of2 = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/nunitV2_paginated_1.xml',
'utf8'
);
const pkgListV2Page2of2 = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/nunitV2_paginated_2.xml',
'utf8'
);
const nugetIndexV3 = fs.readFileSync(
'lib/datasource/nuget/__fixtures__/indexV3.json',
'utf8'
);
const configV3V2 = {
lookupName: 'nunit',
registryUrls: [
'https://api.nuget.org/v3/index.json',