mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
added test for caching
This commit is contained in:
parent
3dead5861b
commit
8497886b23
1 changed files with 15 additions and 0 deletions
15
test/datasource/cargo/index.spec.js
Normal file
15
test/datasource/cargo/index.spec.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
const cargo = require('../../../lib/datasource/cargo');
|
||||
|
||||
describe('cargo datasource', () => {
|
||||
beforeEach(() => {
|
||||
return global.renovateCache.rmAll();
|
||||
});
|
||||
it('should use global cache', async () => {
|
||||
const dep = {
|
||||
name: 'abc123',
|
||||
};
|
||||
await global.renovateCache.set('datasource-cargo', 'foobar', dep, 10);
|
||||
const res = await cargo.getPkgReleases({ lookupName: 'foobar' });
|
||||
expect(res).toEqual(dep);
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue