mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 09:06:25 +00:00
b4319928f1
* refactor: strict manager tests * chore: revert changes * Update lib/modules/manager/gradle/extract.spec.ts
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import { Fixtures } from '../../../../test/fixtures';
|
|
import { extractPackageFile } from '.';
|
|
|
|
describe('modules/manager/bitbucket-pipelines/extract', () => {
|
|
describe('extractPackageFile()', () => {
|
|
it('returns null for empty', () => {
|
|
expect(extractPackageFile('nothing here')).toBeNull();
|
|
});
|
|
|
|
it('extracts dependencies', () => {
|
|
const res = extractPackageFile(Fixtures.get('bitbucket-pipelines.yaml'));
|
|
expect(res?.deps).toMatchInlineSnapshot(`
|
|
Array [
|
|
Object {
|
|
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
|
|
"currentDigest": undefined,
|
|
"currentValue": "10.15.1",
|
|
"datasource": "docker",
|
|
"depName": "node",
|
|
"depType": "docker",
|
|
"replaceString": "node:10.15.1",
|
|
},
|
|
Object {
|
|
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
|
|
"currentDigest": undefined,
|
|
"currentValue": "10.15.2",
|
|
"datasource": "docker",
|
|
"depName": "node",
|
|
"depType": "docker",
|
|
"replaceString": "node:10.15.2",
|
|
},
|
|
Object {
|
|
"currentValue": "0.2.1",
|
|
"datasource": "bitbucket-tags",
|
|
"depName": "atlassian/aws-s3-deploy",
|
|
"depType": "bitbucket-tags",
|
|
},
|
|
]
|
|
`);
|
|
expect(res?.deps).toHaveLength(3);
|
|
});
|
|
});
|
|
});
|