check times remove is called

This commit is contained in:
Ben Irvin 2022-07-26 09:19:40 +02:00
parent cead6cce88
commit a499411086

View File

@ -55,6 +55,7 @@ describe('Sanitize visitors util', () => {
},
{ remove, set }
);
expect(remove).toHaveBeenCalledTimes(1);
expect(remove).toHaveBeenCalledWith(keyCreatedBy);
remove.mockClear();
@ -67,6 +68,7 @@ describe('Sanitize visitors util', () => {
},
{ remove, set }
);
expect(remove).toHaveBeenCalledTimes(1);
expect(remove).toHaveBeenCalledWith(keyUpdatedBy);
expect(set).toBeCalledTimes(0);