finished tests and docs

This commit is contained in:
lotte
2018-10-12 11:55:52 +02:00
parent 1928da8c32
commit 8ffbd13242
14 changed files with 426 additions and 33 deletions

View File

@@ -30,3 +30,15 @@ export const createTestComponent = <T>(html: string, type: { new(...args: any[])
fixture.detectChanges();
return fixture as ComponentFixture<T>;
};
export function spyOnOperator(obj: any, prop: string): any {
const oldProp = obj[prop];
Object.defineProperty(obj, prop, {
configurable: true,
enumerable: true,
value: oldProp,
writable: true
});
return spyOn(obj, prop);
}