mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-14 08:36:26 +00:00
23 lines
624 B
TypeScript
23 lines
624 B
TypeScript
import { readFileSync } from 'fs';
|
|
import { extractPackageFile } from './extract';
|
|
|
|
const sample = readFileSync(
|
|
'lib/manager/nuget/__fixtures__/sample.csproj',
|
|
'utf8'
|
|
);
|
|
|
|
describe('lib/manager/nuget/extract', () => {
|
|
describe('extractPackageFile()', () => {
|
|
let config;
|
|
beforeEach(() => {
|
|
config = {};
|
|
});
|
|
it('returns empty for invalid csproj', () => {
|
|
expect(extractPackageFile('nothing here', config)).toMatchSnapshot();
|
|
});
|
|
it('extracts all dependencies', () => {
|
|
const res = extractPackageFile(sample, config).deps;
|
|
expect(res).toMatchSnapshot();
|
|
});
|
|
});
|
|
});
|