Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
errorDismissed: action.type === DISMISS_ERROR ? true : false,
})
break
default:
return Object.assign({}, state, { isFetching: false })
break
}
},
}
const mockRequest = {
createWord: {
// args PathOrId + type of document
args: [
ConfGlobal.testData.sectionOrWorkspaces + ConfGlobal.testData.dialectPath + '/Dictionary',
{
type: 'FVWord',
name: ConfGlobal.testData.word.name + Date.now().toString(),
properties: ConfGlobal.testData.word.properties,
},
],
evaluateResults: function(response) {
return response.type == 'FVDialect' && response.properties != null
},
},
}
const middleware = [thunk]
export default { actions, reducers, middleware, mockRequest }
const fetchLanguageFamily = RESTActions.fetch('FV_LANGUAGE_FAMILY', 'FVLanguageFamily', {
headers: { 'enrichers.document': 'ancestry' },
})
const actions = { fetchLanguageFamily }
const computeLanguageFamilyFetch = RESTReducers.computeFetch('language_family')
const reducers = {
computeLanguageFamily: computeLanguageFamilyFetch.computeLanguageFamily,
}
const mockRequest = {
fetchLanguageFamily: {
// args PathOrId + type of document
args: [ConfGlobal.testData.sectionOrWorkspaces + ConfGlobal.testData.languageFamilyPath, 'FVLanguageFamily'],
evaluateResults: function(response) {
return response.type == 'FVLanguageFamily' && response.properties != null
},
},
}
const middleware = [thunk]
export default { actions, reducers, middleware, mockRequest }