Renaming cervixPeak in cervixPeakBeforeShift bc it mustn't be the highest cervix value

This commit is contained in:
emelko
2018-09-05 16:03:27 +02:00
parent 809b0f438f
commit d16feb6d58
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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]
} }
} }
+1 -1
View File
@@ -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')
}) })
+2 -2
View File
@@ -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,