Ignore secondary symptom peak after end of temperature evaluation

This commit is contained in:
Julia Friesel
2018-09-28 08:45:52 +02:00
parent 9029be081f
commit fa3a6fb2e7
7 changed files with 145 additions and 49 deletions
+6 -24
View File
@@ -105,30 +105,6 @@ describe('sympto', () => {
}
})
})
it('when the cervix shift is happening after tempEvalEnd', () => {
const values = [1,1,1,1,1,2,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0]
.map(turnIntoCycleDayObject)
const status = getCervixStatus(values, 10)
expect(status).to.eql({
detected: true,
cervixPeakBeforeShift: {
date: 13,
cervix: {
opening: 1,
firmness: 0,
exclude: false
}
},
evaluationCompleteDay: {
date: 16,
cervix: {
opening: 0,
firmness: 0,
exclude: false
}
}
})
})
})
describe('detects no cervix shift', () => {
@@ -144,6 +120,12 @@ describe('sympto', () => {
const status = getCervixStatus(values, 17)
expect(status).to.eql({ detected: false })
})
it('when the cervix shift is happening after tempEvalEnd', () => {
const values = [1,1,1,1,1,2,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0]
.map(turnIntoCycleDayObject)
const status = getCervixStatus(values, 10)
expect(status).to.eql({ detected: false })
})
it('if no days indicate fertile cervix which could be cervix peak', () => {
const values = [1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1]
.map(turnIntoCycleDayObject)