0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 21:48:32 +00:00
renovatebot_renovate/lib/modules/manager/hermit/update.spec.ts
2022-11-15 08:35:36 +00:00

26 lines
812 B
TypeScript

import { codeBlock } from 'common-tags';
import { updateDependency } from '.';
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, 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, upgrade: {} });
expect(ret).toBe(`${fileContent}`);
});
});
});