Skip to content
Snippets Groups Projects
Unverified Commit b6d84a27 authored by Sergio Zharinov's avatar Sergio Zharinov Committed by GitHub
Browse files

fix: Maven-based update functions (#5405)

parent 0b61cfc1
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ describe('manager/deps-edn/update', () => {
newValue: `${dep.currentValue}-9999`,
};
const { currentValue, newValue } = upgrade;
const newFileContent = updateDependency(depsEdn, upgrade);
const newFileContent = updateDependency({ fileContent: depsEdn, upgrade });
const cmpContent = depsEdn.replace(currentValue, newValue);
expect(newFileContent).toEqual(cmpContent);
});
......
export { updateAtPosition as updateDependency } from '../maven/update';
import { UpdateDependencyConfig } from '../common';
import { updateAtPosition } from '../maven/update';
export function updateDependency({
fileContent,
upgrade,
}: UpdateDependencyConfig): string | null {
return updateAtPosition(fileContent, upgrade);
}
......@@ -18,7 +18,10 @@ describe('manager/leiningen/update', () => {
newValue: `${dep.currentValue}-9999`,
};
const { currentValue, newValue } = upgrade;
const newFileContent = updateDependency(leinProjectClj, upgrade);
const newFileContent = updateDependency({
fileContent: leinProjectClj,
upgrade,
});
const cmpContent = leinProjectClj.replace(currentValue, newValue);
expect(newFileContent).toEqual(cmpContent);
});
......
export { updateAtPosition as updateDependency } from '../maven/update';
import { UpdateDependencyConfig } from '../common';
import { updateAtPosition } from '../maven/update';
export function updateDependency({
fileContent,
upgrade,
}: UpdateDependencyConfig): string | null {
return updateAtPosition(fileContent, upgrade);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment