Make mac cycle length test more meaningful
This commit is contained in:
@@ -85,7 +85,6 @@ export default function config(opts) {
|
||||
cycle = cycleDaysSortedByDate.slice(0, cycleStartIndex + 1)
|
||||
cycleLength = startLocalDate.until(todayAsLocalDate, DAYS)
|
||||
}
|
||||
console.log(cycleLength, maxCycleLength)
|
||||
return cycleLength > maxCycleLength ? null : cycle
|
||||
}
|
||||
|
||||
|
||||
+6
-2
@@ -473,10 +473,14 @@ describe('getCyclesBefore', () => {
|
||||
cycleStartsSortedByDate: cycleDaysSortedByDate.filter(d => {
|
||||
return cycleStarts.includes(d.date)
|
||||
}),
|
||||
maxCycleLength: 2
|
||||
maxCycleLength: 30
|
||||
})
|
||||
const result = getCyclesBefore(cycleDaysSortedByDate[0])
|
||||
expect(result.length).to.eql(0)
|
||||
expect(result.length).to.eql(1)
|
||||
expect(result).to.eql([[{
|
||||
bleeding: { value: 2 },
|
||||
date: "2018-06-05"
|
||||
}]])
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user