✨ Résolution de petits problèmes divers
parent
2d966b9e2f
commit
2b2f52d64f
|
@ -35,7 +35,7 @@ export default {
|
|||
Array.isArray(targetInput) ? targetInput : [targetInput]
|
||||
)(nestedSituationToStateSelector(rules)(nestedSituation))
|
||||
|
||||
if (config.debug) return evaluation
|
||||
if (config?.debug) return evaluation
|
||||
|
||||
let values = evaluation.targets.map(t => t.nodeValue)
|
||||
|
||||
|
|
|
@ -734,7 +734,7 @@
|
|||
- si: brut de base < 300
|
||||
message: Entrez un salaire raisonnable
|
||||
niveau: bloquant
|
||||
- si: brut de base < SMIC mensuel
|
||||
- si: brut de base < SMIC
|
||||
niveau: avertissement
|
||||
solution:
|
||||
cible: contrat salarié . temps partiel
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { expect } from 'chai'
|
||||
import Syso from '../source/engine/index'
|
||||
import { propEq } from 'ramda'
|
||||
import sasuRules from '../source/règles/sasu.yaml'
|
||||
|
||||
describe('library', function() {
|
||||
|
@ -76,7 +75,7 @@ describe('library', function() {
|
|||
console.log({ revenuDisponible, dividendes })
|
||||
})
|
||||
|
||||
it('temp', function() {
|
||||
it('should let the user define a simplified revenue tax system', function() {
|
||||
let règles = `
|
||||
- nom: revenu imposable
|
||||
question: Quel est votre revenu imposable ?
|
||||
|
@ -123,10 +122,8 @@ describe('library', function() {
|
|||
let value = Syso.evaluate(
|
||||
target,
|
||||
{ 'revenu imposable': '48000' },
|
||||
{ extra: règles }
|
||||
{ base: règles }
|
||||
)
|
||||
console.log(value)
|
||||
|
||||
expect(value).to.equal(7000)
|
||||
expect(value).to.equal(7253.26)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue