mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
23 lines
377 B
TypeScript
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();
|
|
}
|