renovate/test/workers/repository/index.spec.js
Rhys Arkins ecdcd9df4f
feat: refactor dependency extraction (#1912)
Rewrite of dependency extraction, particularly for npm. Paves way for easier addition of new package managers.

Closes #1882
2018-05-09 08:03:59 +02:00

21 lines
725 B
JavaScript

const { renovateRepository } = require('../../../lib/workers/repository/index');
const process = require('../../../lib/workers/repository/process');
jest.mock('../../../lib/workers/repository/init');
jest.mock('../../../lib/workers/repository/process');
jest.mock('../../../lib/workers/repository/result');
jest.mock('../../../lib/workers/repository/error');
describe('workers/repository', () => {
describe('renovateRepository()', () => {
let config;
beforeEach(() => {
config = require('../../_fixtures/config');
});
it('runs', async () => {
process.processRepo = jest.fn(() => ({}));
const res = await renovateRepository(config);
expect(res).toMatchSnapshot();
});
});
});