mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 09:06:25 +00:00
24 lines
649 B
TypeScript
24 lines
649 B
TypeScript
|
import { readFileSync } from 'fs';
|
||
|
import { resolve } from 'path';
|
||
|
|
||
|
const { extractPackageFile } = require('../../../lib/manager/droneci/extract');
|
||
|
|
||
|
const droneYAML = readFileSync(
|
||
|
resolve('test/manager/droneci/_fixtures/.drone.yml'),
|
||
|
'utf8'
|
||
|
);
|
||
|
|
||
|
describe('lib/manager/droneci/extract', () => {
|
||
|
describe('extractPackageFile()', () => {
|
||
|
it('returns null for empty', () => {
|
||
|
expect(extractPackageFile('nothing here')).toBeNull();
|
||
|
});
|
||
|
|
||
|
it('extracts multiple image lines', () => {
|
||
|
const res = extractPackageFile(droneYAML);
|
||
|
expect(res.deps).toMatchSnapshot();
|
||
|
expect(res.deps).toHaveLength(4);
|
||
|
});
|
||
|
});
|
||
|
});
|