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) {
|
||||
return {
|
||||
detected: true,
|
||||
cervixPeak: day,
|
||||
cervixPeakBeforeShift: day,
|
||||
evaluationCompleteDay: threeFollowingDays[threeFollowingDays.length - 1]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,9 +142,9 @@ describe('sympto', () => {
|
||||
start: { date: '2018-06-17', time: '18:00' },
|
||||
cycleDays: tempAndCervixEvalEndOnSameDay
|
||||
.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.cervixPeak.date).to.eql('2018-06-14')
|
||||
expect(status.cervixShift.evaluationCompleteDay.date).to.eql('2018-06-17')
|
||||
})
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ describe('sympto', () => {
|
||||
const status = getCervixStatus(values)
|
||||
expect(status).to.eql({
|
||||
detected: true,
|
||||
cervixPeak: {
|
||||
cervixPeakBeforeShift: {
|
||||
date: 13,
|
||||
cervix: {
|
||||
isHard: true,
|
||||
@@ -58,7 +58,7 @@ describe('sympto', () => {
|
||||
const status = getCervixStatus(values)
|
||||
expect(status).to.eql({
|
||||
detected: true,
|
||||
cervixPeak: {
|
||||
cervixPeakBeforeShift: {
|
||||
date: 0,
|
||||
cervix: {
|
||||
isHard: false,
|
||||
|
||||
Reference in New Issue
Block a user