UNPKG

@tjoskar/react-lazyload-img

Version:
21 lines 644 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const simple_spy_1 = require("simple-spy"); const lazyload_1 = require("../lazyload"); describe('call', () => { test('Should not throw if function is not defind', () => { // Arrange const fn = undefined; // Act and assert expect(() => lazyload_1.call(fn)).not.toThrow(); }); test('Should call function', () => { // Arrange const fn = simple_spy_1.spy(); // Act lazyload_1.call(fn); // Assert expect(fn.callCount).toBe(1); }); }); //# sourceMappingURL=lazyload.test.js.map