ci(release): handle no folder gracefully (#27)
This commit is contained in:
parent
66adc32ff7
commit
bf4743acac
2 changed files with 18 additions and 0 deletions
|
@ -57,6 +57,12 @@ describe("push-charts", () => {
|
|||
});
|
||||
|
||||
describe("getChangedCharts", () => {
|
||||
test("should return empty if archive folder does not exist", async () => {
|
||||
fs.access.mockRejectedValue(new Error("not found"));
|
||||
child_process.execSync.mockReturnValue(Buffer.from(""));
|
||||
await expect(getChangedChartsArchives(["my-chart"])).resolves.toEqual([]);
|
||||
});
|
||||
|
||||
test("should return changed chart if only one exists", async () => {
|
||||
fs.readdir.mockResolvedValue([myChartDirentMock]);
|
||||
child_process.execSync.mockReturnValue(Buffer.from(""));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue