mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
101108: Angular 15 upgrade - test build & run fixes
This commit is contained in:
@@ -17,9 +17,9 @@
|
||||
"build:stats": "ng build --stats-json",
|
||||
"build:prod": "yarn run build:ssr",
|
||||
"build:ssr": "ng build --configuration production && ng run dspace-angular:server:production",
|
||||
"test": "ng test --sourceMap=true --watch=false --configuration test",
|
||||
"test:watch": "nodemon --exec \"ng test --sourceMap=true --watch=true --configuration test\"",
|
||||
"test:headless": "ng test --sourceMap=true --watch=false --configuration test --browsers=ChromeHeadless --code-coverage",
|
||||
"test": "ng test --source-map=true --watch=false --configuration test",
|
||||
"test:watch": "nodemon --exec \"ng test --source-map=true --watch=true --configuration test\"",
|
||||
"test:headless": "ng test --source-map=true --watch=false --configuration test --browsers=ChromeHeadless --code-coverage",
|
||||
"lint": "ng lint",
|
||||
"lint-fix": "ng lint --fix=true",
|
||||
"e2e": "ng e2e",
|
||||
@@ -203,4 +203,4 @@
|
||||
"webpack-cli": "^4.2.0",
|
||||
"webpack-dev-server": "^4.5.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@ export function createPaginatedList<T>(objects?: T[]): PaginatedList<T> {
|
||||
* @param prop The property/function to spy on
|
||||
*/
|
||||
export function spyOnExported<T>(target: T, prop: keyof T): jasmine.Spy {
|
||||
const spy = jasmine.createSpy(`${prop}Spy`);
|
||||
const spy = jasmine.createSpy(`${String(prop)}Spy`);
|
||||
spyOnProperty(target, prop).and.returnValue(spy);
|
||||
return spy;
|
||||
}
|
||||
|
@@ -9,8 +9,6 @@ import {
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
@@ -24,8 +22,3 @@ jasmine.getEnv().afterEach(() => {
|
||||
// Close any leftover modals
|
||||
getTestBed().inject(NgbModal, null)?.dismissAll?.();
|
||||
});
|
||||
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
|
Reference in New Issue
Block a user