Skip to content

Commit

Permalink
feat: remove ng-version from the container
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver committed Jul 29, 2018
1 parent 897a7d9 commit bb42011
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 9 additions & 3 deletions projects/ngx-testing-library/src/lib/ngx-testing-library.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import { Component } from '@angular/core';
import { Component, OnInit, ElementRef } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { getQueriesForElement, prettyDOM, fireEvent, FireFunction, FireObject } from 'dom-testing-library';
import { getQueriesForElement, prettyDOM, fireEvent, FireObject } from 'dom-testing-library';

import { Options, RenderResult, ComponentInput } from './models';

@Component({ selector: 'test-component', template: '' })
class TestComponent {}
class TestComponent implements OnInit {
constructor(private elemtRef: ElementRef) {}

ngOnInit() {
this.elemtRef.nativeElement.removeAttribute('ng-version');
}
}

export async function createComponent<T>(template: string, options: Options): Promise<RenderResult>;
export async function createComponent<T>(component: ComponentInput<T>, options: Options): Promise<RenderResult>;
Expand Down
1 change: 0 additions & 1 deletion src/app/__snapshots__/app.component.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
exports[`matches snapshot 1`] = `
<div
id="root0"
ng-version="6.1.0"
>
<app-root>
<div
Expand Down

0 comments on commit bb42011

Please sign in to comment.