Combine temp and mucus evaluation

This commit is contained in:
Julia Friesel
2018-07-05 13:53:06 +02:00
parent f1f9c7773a
commit 836bea778c
5 changed files with 113 additions and 16 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ describe('sympto', () => {
it('detects mucus shift correctly', function () {
const values = [0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 2, 2, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0]
.map(turnIntoCycleDayObject)
const status = getMucusStatus(values)
const status = getMucusStatus(values, 30)
expect(status).to.eql({
detected: true,
mucusPeak: {
@@ -29,7 +29,7 @@ describe('sympto', () => {
it('detects no mucus shift when there are less than 3 days of lower quality', function () {
const values = [0, 1, 1, 2, 0, 0, 1, 2, 3, 2, 3, 3, 3, 2, 2]
.map(turnIntoCycleDayObject)
const status = getMucusStatus(values)
const status = getMucusStatus(values, 30)
expect(status).to.eql({ detected: false })
})
@@ -41,7 +41,7 @@ describe('sympto', () => {
it('detects no mucus shift when the mucus values are all the same', function () {
const values = [2, 2, 2, 2, 2, 2, 2, 2]
.map(turnIntoCycleDayObject)
const status = getMucusStatus(values)
const status = getMucusStatus(values, 30)
expect(status).to.eql({ detected: false })
})
})