How to use the @ngx-formly/core/testing.createFieldChangesSpy function in @ngx-formly/core

To help you get started, we’ve selected a few @ngx-formly/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngx-formly / ngx-formly / src / core / src / lib / components / formly.field.spec.ts View on Github external
it('should ignore default debounce when using "blur" or "submit"', () => {
      const { field } = renderComponent({
        key: 'foo',
        type: 'input',
        modelOptions: {
          debounce: { default: 5 },
          updateOn: 'blur',
        },
      });

      const [spy, subscription] = createFieldChangesSpy(field);

      field.formControl.setValue('15');
      expect(spy).toHaveBeenCalled();
      subscription.unsubscribe();
    });

@ngx-formly/core

Formly is a dynamic (JSON powered) form library for Angular that bring unmatched maintainability to your application's forms.

MIT
Latest version published 14 days ago

Package Health Score

92 / 100
Full package analysis

Similar packages