Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('call pushFile when checksum is different', async () => {
const mockPushFile = jest.fn();
hasha.fromFileSync = jest
.fn()
.mockReturnValueOnce('qazwsx')
.mockReturnValueOnce('wsxedc');
yoctolStatic.__setMockPushFile(mockPushFile);
fileType.mockReturnValue({
mime: 'image/png',
});
await uploadImages({ folderPath });
expect(mockPushFile).toHaveBeenCalledTimes(2);
});