How to use the @delon/testing.dispatchFakeEvent function in @delon/testing

To help you get started, we’ve selected a few @delon/testing 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 ng-alain / delon / packages / form / spec / base.spec.ts View on Github external
typeEvent(eventName: string, cls = 'input'): this {
    const node = document.querySelector(cls) as HTMLInputElement;
    if (node == null) {
      expect(true).toBe(false, `won't found '${cls}' class element`);
      return this;
    }
    dispatchFakeEvent(node, eventName);
    return this.time().dc();
  }