"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/app/shared/mocks/theme-service.mock.ts" between
dspace-angular-dspace-7.0.tar.gz and dspace-angular-dspace-7.1.tar.gz

About: dspace-angular is the Angular-based frontend of DSpace, a digital repository system to capture, store, index, preserve and redistribute an organization’s research material in digital formats.

theme-service.mock.ts  (dspace-angular-dspace-7.0):theme-service.mock.ts  (dspace-angular-dspace-7.1)
import { ThemeService } from '../theme-support/theme.service'; import { ThemeService } from '../theme-support/theme.service';
import { of as observableOf } from 'rxjs'; import { of as observableOf } from 'rxjs';
import { ThemeConfig } from '../../../config/theme.model';
import { isNotEmpty } from '../empty.util';
export function getMockThemeService(themeName = 'base'): ThemeService { export function getMockThemeService(themeName = 'base', themes?: ThemeConfig[]):
return jasmine.createSpyObj('themeService', { ThemeService {
const spy = jasmine.createSpyObj('themeService', {
getThemeName: themeName, getThemeName: themeName,
getThemeName$: observableOf(themeName) getThemeName$: observableOf(themeName),
getThemeConfigFor: undefined,
}); });
if (isNotEmpty(themes)) {
spy.getThemeConfigFor.and.callFake((name: string) => themes.find(theme => th
eme.name === name));
}
return spy;
} }
 End of changes. 4 change blocks. 
3 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)