Renommage de test battery en test suite

pull/37/head
mama 2017-08-21 15:49:50 +02:00
parent 187d809b1a
commit 428205f79a
1 changed files with 4 additions and 4 deletions

View File

@ -8,17 +8,17 @@ import {expect} from 'chai'
import {enrichRule} from '../source/engine/rules'
import {analyseTopDown} from '../source/engine/traverse'
import {collectMissingVariables} from '../source/engine/generateQuestions'
import testBatteries from './load-mecanism-tests'
import testSuites from './load-mecanism-tests'
import R from 'ramda'
describe('Mécanismes', () =>
testBatteries.map( battery =>
battery.map(({exemples, nom, test}) =>
testSuites.map( suite =>
suite.map(({exemples, nom, test}) =>
exemples && describe(test || 'Nom de test (propriété "test") manquant dans la variable contenant ces "exemples"', () =>
exemples.map(({nom: testTexte, situation, 'valeur attendue': valeur, 'variables manquantes': expectedMissing}) =>
it(testTexte + '', () => {
let rules = [...battery].map(enrichRule),
let rules = suite.map(enrichRule),
state = situation || {},
stateSelector = name => state[name],
analysis = analyseTopDown(rules, nom)(stateSelector),