Skip to content
Snippets Groups Projects
jest.helper.ts 517 B
Newer Older
  • Learn to ignore specific revisions
  • OZGCloud's avatar
    OZGCloud committed
    import { ComponentFixture } from '@angular/core/testing';
    
    OZGCloud's avatar
    OZGCloud committed
    import { expect } from '@jest/globals';
    
    OZGCloud's avatar
    OZGCloud committed
    import { getElementFromFixture } from './helper';
    
    OZGCloud's avatar
    OZGCloud committed
    
    export function notExistsAsHtmlElement(fixture: ComponentFixture<any>, domElement: string): void {
    
      expect(getElementFromFixture(fixture, domElement)).not.toBeInstanceOf(HTMLElement);
    
    OZGCloud's avatar
    OZGCloud committed
    }
    
    export function existsAsHtmlElement(fixture: ComponentFixture<any>, domElement: string): void {
    
      expect(getElementFromFixture(fixture, domElement)).toBeInstanceOf(HTMLElement);
    }