mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -08:00
test(core): Add test for suppressing error on non-existing filepath (no-changelog) (#7421)
Follow-up to #7411
This commit is contained in:
parent
1fb5166376
commit
609f0837cf
|
@ -151,6 +151,18 @@ describe('deleteMany()', () => {
|
|||
|
||||
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()', () => {
|
||||
|
|
Loading…
Reference in a new issue