mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-11 03:53:02 +00:00
add docs, rename classes for clarity
This commit is contained in:
@@ -31,6 +31,14 @@ export const createTestComponent = <T>(html: string, type: { new(...args: any[])
|
||||
return fixture as ComponentFixture<T>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Allows you to spy on a read only property
|
||||
*
|
||||
* @param obj
|
||||
* The object to spy on
|
||||
* @param prop
|
||||
* The property to spy on
|
||||
*/
|
||||
export function spyOnOperator(obj: any, prop: string): any {
|
||||
const oldProp = obj[prop];
|
||||
Object.defineProperty(obj, prop, {
|
||||
|
Reference in New Issue
Block a user