Browse Source

test(core): change debounce time

pull/2215/head
thediaval 7 years ago
parent
commit
89c30a615d
  1. 4
      npm/ng-packs/packages/core/src/lib/tests/form-submit.directive.spec.ts

4
npm/ng-packs/packages/core/src/lib/tests/form-submit.directive.spec.ts

@ -7,7 +7,7 @@ describe('FormSubmitDirective', () => {
let spectator: SpectatorDirective<FormSubmitDirective>; let spectator: SpectatorDirective<FormSubmitDirective>;
let directive: FormSubmitDirective; let directive: FormSubmitDirective;
let formGroup = new FormGroup({}); const formGroup = new FormGroup({});
const submitEventFn = jest.fn(() => {}); const submitEventFn = jest.fn(() => {});
const createDirective = createDirectiveFactory({ const createDirective = createDirectiveFactory({
@ -38,7 +38,7 @@ describe('FormSubmitDirective', () => {
test('should dispatch submit event on keyup event triggered after given debounce time', done => { test('should dispatch submit event on keyup event triggered after given debounce time', done => {
spectator.dispatchKeyboardEvent('form', 'keyup', 'Enter'); spectator.dispatchKeyboardEvent('form', 'keyup', 'Enter');
timer(directive.debounce + 1).subscribe(() => { timer(directive.debounce + 10).subscribe(() => {
expect(submitEventFn).toHaveBeenCalled(); expect(submitEventFn).toHaveBeenCalled();
done(); done();
}); });

Loading…
Cancel
Save