mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 17:16:25 +00:00
20 lines
568 B
TypeScript
20 lines
568 B
TypeScript
import fs from 'fs-extra';
|
|
import upath from 'upath';
|
|
import { extractPackageFile } from '.';
|
|
|
|
const sample = fs.readFileSync(
|
|
upath.resolve(__dirname, './__fixtures__/mix.exs'),
|
|
'utf-8'
|
|
);
|
|
|
|
describe('lib/manager/mix/extract', () => {
|
|
describe('extractPackageFile()', () => {
|
|
it('returns empty for invalid dependency file', () => {
|
|
expect(extractPackageFile('nothing here')).toMatchSnapshot();
|
|
});
|
|
it('extracts all dependencies', () => {
|
|
const res = extractPackageFile(sample).deps;
|
|
expect(res).toMatchSnapshot();
|
|
});
|
|
});
|
|
});
|