Files
renovate/lib/modules/manager/hermit/update.spec.ts
2026-03-30 17:32:36 +00:00

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}`);
});
});
});