UNPKG

@tjoskar/react-lazyload-img

Version:
19 lines 515 B
import { spy } from 'simple-spy'; import { call } from '../lazyload'; describe('call', () => { test('Should not throw if function is not defind', () => { // Arrange const fn = undefined; // Act and assert expect(() => call(fn)).not.toThrow(); }); test('Should call function', () => { // Arrange const fn = spy(); // Act call(fn); // Assert expect(fn.callCount).toBe(1); }); }); //# sourceMappingURL=lazyload.test.js.map