mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
test(core): Add test for suppressing error on non-existing filepath (no-changelog) (#7421)
Follow-up to #7411
This commit is contained in:
@@ -151,6 +151,18 @@ describe('deleteMany()', () => {
|
|||||||
|
|
||||||
expect(fsp.rm).toHaveBeenCalledTimes(2);
|
expect(fsp.rm).toHaveBeenCalledTimes(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should suppress error on non-existing filepath', async () => {
|
||||||
|
const ids = [{ workflowId: 'does-not-exist', executionId: 'does-not-exist' }];
|
||||||
|
|
||||||
|
fsp.rm = jest.fn().mockResolvedValue(undefined);
|
||||||
|
|
||||||
|
const promise = fsManager.deleteMany(ids);
|
||||||
|
|
||||||
|
await expect(promise).resolves.not.toThrow();
|
||||||
|
|
||||||
|
expect(fsp.rm).toHaveBeenCalledTimes(1);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('rename()', () => {
|
describe('rename()', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user