Files
dspace-angular/src/app/shared/mocks/mock-native-window-ref.ts
2022-01-26 16:41:24 +01:00

23 lines
377 B
TypeScript

export const MockWindow = {
location: {
_href: '',
set href(url: string) {
this._href = url;
},
get href() {
return this._href;
}
},
origin: 'http://localhost'
};
export class NativeWindowRefMock {
get nativeWindow(): any {
return MockWindow;
}
}
export function NativeWindowMockFactory() {
return new NativeWindowRefMock();
}