Renaming cervixPeak in cervixPeakBeforeShift bc it mustn't be the highest cervix value
This commit is contained in:
@@ -27,7 +27,7 @@ export default function (cycleDays, tempEvalEndIndex) {
|
|||||||
if (onlyClosedAndHardUntilEndOfTempEval) {
|
if (onlyClosedAndHardUntilEndOfTempEval) {
|
||||||
return {
|
return {
|
||||||
detected: true,
|
detected: true,
|
||||||
cervixPeak: day,
|
cervixPeakBeforeShift: day,
|
||||||
evaluationCompleteDay: threeFollowingDays[threeFollowingDays.length - 1]
|
evaluationCompleteDay: threeFollowingDays[threeFollowingDays.length - 1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,9 +142,9 @@ describe('sympto', () => {
|
|||||||
start: { date: '2018-06-17', time: '18:00' },
|
start: { date: '2018-06-17', time: '18:00' },
|
||||||
cycleDays: tempAndCervixEvalEndOnSameDay
|
cycleDays: tempAndCervixEvalEndOnSameDay
|
||||||
.filter(({date}) => date >= '2018-06-17')
|
.filter(({date}) => date >= '2018-06-17')
|
||||||
|
expect(status.cervixShift.cervixPeakBeforeShift.date).to.eql('2018-06-14')
|
||||||
})
|
})
|
||||||
expect(status.cervixShift.detected).to.be.true()
|
expect(status.cervixShift.detected).to.be.true()
|
||||||
expect(status.cervixShift.cervixPeak.date).to.eql('2018-06-14')
|
|
||||||
expect(status.cervixShift.evaluationCompleteDay.date).to.eql('2018-06-17')
|
expect(status.cervixShift.evaluationCompleteDay.date).to.eql('2018-06-17')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ describe('sympto', () => {
|
|||||||
const status = getCervixStatus(values)
|
const status = getCervixStatus(values)
|
||||||
expect(status).to.eql({
|
expect(status).to.eql({
|
||||||
detected: true,
|
detected: true,
|
||||||
cervixPeak: {
|
cervixPeakBeforeShift: {
|
||||||
date: 13,
|
date: 13,
|
||||||
cervix: {
|
cervix: {
|
||||||
isHard: true,
|
isHard: true,
|
||||||
@@ -58,7 +58,7 @@ describe('sympto', () => {
|
|||||||
const status = getCervixStatus(values)
|
const status = getCervixStatus(values)
|
||||||
expect(status).to.eql({
|
expect(status).to.eql({
|
||||||
detected: true,
|
detected: true,
|
||||||
cervixPeak: {
|
cervixPeakBeforeShift: {
|
||||||
date: 0,
|
date: 0,
|
||||||
cervix: {
|
cervix: {
|
||||||
isHard: false,
|
isHard: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user