refactor: fix broken linting rules due to revert
This commit is contained in:
@ -412,8 +412,9 @@ function declareTests(config?: {useJit: boolean}) {
|
||||
const ngIfEl = fixture.debugElement.children[0];
|
||||
const someViewport: SomeViewport =
|
||||
ngIfEl.childNodes
|
||||
.find(debugElement => debugElement.nativeNode.nodeType === Node.COMMENT_NODE)!
|
||||
.injector.get(SomeViewport);
|
||||
.find(
|
||||
debugElement => debugElement.nativeNode.nodeType ===
|
||||
Node.COMMENT_NODE) !.injector.get(SomeViewport);
|
||||
expect(someViewport.container.length).toBe(2);
|
||||
expect(ngIfEl.children.length).toBe(2);
|
||||
|
||||
@ -812,7 +813,7 @@ function declareTests(config?: {useJit: boolean}) {
|
||||
})
|
||||
.createComponent(MyComp);
|
||||
const tc = fixture.debugElement.childNodes.find(
|
||||
debugElement => debugElement.nativeNode.nodeType === Node.COMMENT_NODE)!;
|
||||
debugElement => debugElement.nativeNode.nodeType === Node.COMMENT_NODE) !;
|
||||
|
||||
const emitter = tc.injector.get(DirectiveEmittingEvent);
|
||||
const myComp = fixture.debugElement.injector.get(MyComp);
|
||||
|
@ -315,7 +315,7 @@ describe('discovery utils', () => {
|
||||
|
||||
it('should work on templates', () => {
|
||||
const templateComment = Array.from(fixture.hostElement.childNodes)
|
||||
.find((node: ChildNode) => node.nodeType === Node.COMMENT_NODE)!;
|
||||
.find((node: ChildNode) => node.nodeType === Node.COMMENT_NODE) !;
|
||||
const lContext = loadLContext(templateComment);
|
||||
expect(lContext).toBeDefined();
|
||||
expect(lContext.native as any).toBe(templateComment);
|
||||
@ -323,7 +323,7 @@ describe('discovery utils', () => {
|
||||
|
||||
it('should work on ICU expressions', () => {
|
||||
const icuComment = Array.from(fixture.hostElement.querySelector('i18n') !.childNodes)
|
||||
.find((node: ChildNode) => node.nodeType === Node.COMMENT_NODE)!;
|
||||
.find((node: ChildNode) => node.nodeType === Node.COMMENT_NODE) !;
|
||||
const lContext = loadLContext(icuComment);
|
||||
expect(lContext).toBeDefined();
|
||||
expect(lContext.native as any).toBe(icuComment);
|
||||
@ -333,7 +333,7 @@ describe('discovery utils', () => {
|
||||
const ngContainerComment = Array.from(fixture.hostElement.childNodes)
|
||||
.find(
|
||||
(node: ChildNode) => node.nodeType === Node.COMMENT_NODE &&
|
||||
node.textContent === `ng-container`)!;
|
||||
node.textContent === `ng-container`) !;
|
||||
const lContext = loadLContext(ngContainerComment);
|
||||
expect(lContext).toBeDefined();
|
||||
expect(lContext.native as any).toBe(ngContainerComment);
|
||||
|
Reference in New Issue
Block a user