mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-31 01:37:24 +00:00
34 lines
937 B
TypeScript
34 lines
937 B
TypeScript
import { codeBlock } from 'common-tags';
|
|
import { updateDependency } from './index.ts';
|
|
|
|
describe('modules/manager/hermit/update', () => {
|
|
describe('updateDependency', () => {
|
|
it('should append a new marking line at the end to trigger the artifact update', () => {
|
|
const fileContent = codeBlock`
|
|
#!/bin/bash
|
|
#some hermit content
|
|
`;
|
|
const ret = updateDependency({
|
|
fileContent,
|
|
packageFile: 'bin/hermit',
|
|
upgrade: {},
|
|
});
|
|
expect(ret).toBe(`${fileContent}\n#hermit updated`);
|
|
});
|
|
|
|
it('should not update again if the new line has been appended', () => {
|
|
const fileContent = codeBlock`
|
|
#!/bin/bash
|
|
#some hermit content
|
|
#hermit updated
|
|
`;
|
|
const ret = updateDependency({
|
|
fileContent,
|
|
packageFile: 'bin/hermit',
|
|
upgrade: {},
|
|
});
|
|
expect(ret).toBe(`${fileContent}`);
|
|
});
|
|
});
|
|
});
|