mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 11:33:04 +00:00
finished tests and docs
This commit is contained in:
@@ -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);
|
||||
}
|
Reference in New Issue
Block a user