mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 06:23:03 +00:00
Let linting exit with a nonzero status
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
"test:watch": "karma start --no-single-run --auto-watch",
|
||||
"webdriver:start": "node node_modules/protractor/bin/webdriver-manager start --seleniumPort 4444",
|
||||
"webdriver:update": "node node_modules/protractor/bin/webdriver-manager update --standalone",
|
||||
"lint": "tslint \"src/**/*.ts\" || true && tslint \"e2e/**/*.ts\" || true",
|
||||
"lint": "tslint \"src/**/*.ts\" && tslint \"e2e/**/*.ts\"",
|
||||
"docs": "typedoc --options typedoc.json ./src/",
|
||||
"coverage": "http-server -c-1 -o -p 9875 ./coverage"
|
||||
},
|
||||
|
@@ -41,7 +41,7 @@ describe('SearchFacetFilterComponent', () => {
|
||||
}
|
||||
];
|
||||
let filterService;
|
||||
let page = Observable.of(0)
|
||||
const page = Observable.of(0)
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, FormsModule],
|
||||
@@ -147,8 +147,8 @@ describe('SearchFacetFilterComponent', () => {
|
||||
|
||||
it('should return the correct number of items shown (this equals the page count x page size)', () => {
|
||||
const sub = count.subscribe((c) => {
|
||||
const subsub = comp.currentPage.subscribe((page) => {
|
||||
expect(c).toBe(page * mockFilterConfig.pageSize);
|
||||
const subsub = comp.currentPage.subscribe((currentPage) => {
|
||||
expect(c).toBe(currentPage * mockFilterConfig.pageSize);
|
||||
});
|
||||
subsub.unsubscribe()
|
||||
});
|
||||
@@ -188,4 +188,4 @@ describe('SearchFacetFilterComponent', () => {
|
||||
expect(filterService.getPage).toHaveBeenCalledWith(mockFilterConfig.name)
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -166,6 +166,4 @@ describe('SearchFilterComponent', () => {
|
||||
sub.unsubscribe();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
@@ -109,10 +109,10 @@ describe('SearchPageComponent', () => {
|
||||
});
|
||||
|
||||
describe('when update search results is called', () => {
|
||||
let pagination;
|
||||
let sort;
|
||||
let paginationUpdate;
|
||||
let sortUpdate;
|
||||
beforeEach(() => {
|
||||
pagination = Object.assign(
|
||||
paginationUpdate = Object.assign(
|
||||
{},
|
||||
new PaginationComponentOptions(),
|
||||
{
|
||||
@@ -120,7 +120,7 @@ describe('SearchPageComponent', () => {
|
||||
pageSize: 15
|
||||
}
|
||||
);
|
||||
sort = Object.assign({},
|
||||
sortUpdate = Object.assign({},
|
||||
new SortOptions(),
|
||||
{
|
||||
direction: SortDirection.Ascending,
|
||||
|
@@ -15,6 +15,4 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
export class SearchSidebarComponent {
|
||||
@Input() resultCount;
|
||||
@Output() toggleSidebar = new EventEmitter<boolean>();
|
||||
constructor() {
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,6 @@ import { HeaderComponent } from './header.component';
|
||||
import { HeaderState } from './header.reducer';
|
||||
import { HeaderToggleAction } from './header.actions';
|
||||
|
||||
|
||||
let comp: HeaderComponent;
|
||||
let fixture: ComponentFixture<HeaderComponent>;
|
||||
let store: Store<HeaderState>;
|
||||
|
@@ -18,7 +18,7 @@ export class RouteService {
|
||||
}
|
||||
|
||||
hasQueryParam(paramName: string): Observable<boolean> {
|
||||
return this.route.queryParamMap.map((map) => {return map.has(paramName);});
|
||||
return this.route.queryParamMap.map((map) => map.has(paramName));
|
||||
}
|
||||
|
||||
hasQueryParamWithValue(paramName: string, paramValue: string): Observable<boolean> {
|
||||
|
Reference in New Issue
Block a user