swimlane/ngx-ui

View on GitHub
projects/swimlane/ngx-ui/src/lib/decorators/throttleable/throttleable.decorator.spec.ts

Summary

Maintainability
B
4 hrs
Test Coverage
import { ThrottleableFixture } from './throttleable.fixture';

describe('throttleable', () => {
  let fixture: ThrottleableFixture;

  beforeEach(() => {
    fixture = new ThrottleableFixture();
  });

  it('should call throttleable fn', done => {
    const spy = spyOn(fixture, 'doSomething');
    fixture.fn();

    setTimeout(() => {
      expect(spy).toHaveBeenCalled();
      done();
    }, 10);
  });
});