Skip to content

Commit

Permalink
add test for getComponentDecoratorMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
saulodias committed Aug 20, 2021
1 parent 1ad300f commit 235f498
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ import {
import { TestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';

import { getComponentInputsOutputs, isComponent, isDeclarable } from './NgComponentAnalyzer';
import {
getComponentInputsOutputs,
isComponent,
isDeclarable,
getComponentDecoratorMetadata,
} from './NgComponentAnalyzer';

describe('getComponentInputsOutputs', () => {
it('should return empty if no I/O found', () => {
Expand Down Expand Up @@ -159,6 +164,15 @@ describe('isComponent', () => {
});
});

describe('getComponentDecoratorMetadata', () => {
it('should return Component with a Component', () => {
@Component({})
class FooComponent {}

expect(getComponentDecoratorMetadata(FooComponent)).toBeInstanceOf(Component);
});
});

function sortByPropName(
array: {
propName: string;
Expand Down

0 comments on commit 235f498

Please sign in to comment.