Skip to content
Snippets Groups Projects
Commit e7dbfd6b authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

WIP: Tests on search reducer

parent 185748d3
No related branches found
No related tags found
2 merge requests!29Develop,!8Resolve "Add tests for instance store module"
......@@ -12,6 +12,11 @@ import { createReducer, on } from '@ngrx/store';
import { Criterion } from '../models';
import * as searchActions from '../actions/search.actions';
/**
* Interface for search state.
*
* @interface State
*/
export interface State {
pristine: boolean;
currentDataset: string,
......@@ -92,7 +97,7 @@ export const searchReducer = createReducer(
...state,
criteriaList: [...state.criteriaList.filter(c => c.id !== idCriterion)]
})),
on(searchActions.updateOutputList, (state, { outputList}) => ({
on(searchActions.updateOutputList, (state, { outputList }) => ({
...state,
outputList
})),
......@@ -136,7 +141,7 @@ export const searchReducer = createReducer(
})),
on(searchActions.destroyResults, state => ({
...state,
searchData: [],
data: [],
dataLength: null
})),
on(searchActions.resetSearch, () => ({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment