fixup! Separation du gros reducer des autres

pull/209/head
Mael 2018-04-25 16:21:52 +02:00
parent a4d60afe77
commit 04cb772336
2 changed files with 21 additions and 12 deletions

View File

@ -7,7 +7,7 @@ import {
getObjectives
} from '../source/engine/generateQuestions'
import { reduceSteps } from '../source/reducers'
import reduceSteps from '../source/reducers/reduceSteps'
import { popularTargetNames } from '../source/components/TargetSelection'
import yaml from 'js-yaml'
@ -122,7 +122,7 @@ describe('fold', function() {
var step1 = reducer(
{ foldedSteps: [], targetNames: ['net'] },
{ type: 'START_CONVERSATION'}
{ type: 'START_CONVERSATION' }
)
expect(step1).to.have.property('currentQuestion')

View File

@ -2,7 +2,7 @@ import * as R from 'ramda'
import { expect } from 'chai'
import { rules as realRules, enrichRule } from '../source/engine/rules'
import { analyse, parseAll } from '../source/engine/traverse'
import { reduceSteps } from '../source/reducers'
import reduceSteps from '../source/reducers/reduceSteps'
import {
byBranch,
@ -51,7 +51,8 @@ describe('results grid', function() {
reducer = reduceSteps(tracker, rules, stateSelector)
var step1 = reducer(
{ foldedSteps: [],
{
foldedSteps: [],
targetNames: ['salaire net', 'salaire total']
},
{ type: 'START_CONVERSATION' }
@ -86,8 +87,10 @@ describe('results grid', function() {
reducer = reduceSteps(tracker, rules, stateSelector)
var step1 = reducer(
{ foldedSteps: [],
targetNames: ['salaire net', 'salaire total'] },
{
foldedSteps: [],
targetNames: ['salaire net', 'salaire total']
},
{ type: 'START_CONVERSATION' }
)
fakeState['contrat salarié . salaire de base'] = 2300
@ -118,8 +121,10 @@ describe('results grid', function() {
reducer = reduceSteps(tracker, rules, stateSelector)
var step1 = reducer(
{ foldedSteps: [],
targetNames: ['salaire net', 'salaire total'] },
{
foldedSteps: [],
targetNames: ['salaire net', 'salaire total']
},
{ type: 'START_CONVERSATION' }
)
fakeState['contrat salarié . salaire de base'] = 2300
@ -143,8 +148,10 @@ describe('results grid', function() {
reducer = reduceSteps(tracker, rules, stateSelector)
var step1 = reducer(
{ foldedSteps: [],
targetNames: ['salaire net', 'salaire total'] },
{
foldedSteps: [],
targetNames: ['salaire net', 'salaire total']
},
{ type: 'START_CONVERSATION' }
)
fakeState['contrat salarié . salaire de base'] = 2300
@ -176,8 +183,10 @@ describe('results grid', function() {
reducer = reduceSteps(tracker, rules, stateSelector)
var step1 = reducer(
{ foldedSteps: [],
targetNames: ['salaire net', 'salaire total'] },
{
foldedSteps: [],
targetNames: ['salaire net', 'salaire total']
},
{ type: 'START_CONVERSATION' }
)
fakeState['contrat salarié . salaire de base'] = 2300