mirror of https://github.com/abpframework/abp.git
4 changed files with 36 additions and 23 deletions
@ -1,2 +1,19 @@ |
|||
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone'; |
|||
setupZoneTestEnv(); |
|||
import 'zone.js'; |
|||
import 'zone.js/testing'; |
|||
import { getTestBed } from '@angular/core/testing'; |
|||
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing'; |
|||
|
|||
// Initialize Angular testing environment
|
|||
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting()); |
|||
|
|||
// Mock window.location for test environment
|
|||
Object.defineProperty(window, 'location', { |
|||
value: { |
|||
href: 'http://localhost:4200', |
|||
origin: 'http://localhost:4200', |
|||
pathname: '/', |
|||
search: '', |
|||
hash: '', |
|||
}, |
|||
writable: true, |
|||
}); |
|||
|
|||
Loading…
Reference in new issue