Change sympto module structure
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
Text
|
||||
} from 'react-native'
|
||||
import cycleModule from '../lib/cycle'
|
||||
import { getTemperatureFertilityStatus } from '../lib/sensiplan-adapter'
|
||||
import { getTemperatureFertilityStatus } from '../lib/sympto-adapter'
|
||||
import DayView from './cycle-day-overview'
|
||||
import BleedingEditView from './bleeding'
|
||||
import TemperatureEditView from './temperature'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { detectTemperatureShift } from './sensiplan'
|
||||
import { detectTemperatureShift } from './sympto/temperature'
|
||||
import cycleModule from './cycle'
|
||||
|
||||
const getLastMensesStart = cycleModule().getLastMensesStart
|
||||
@@ -8,7 +8,7 @@ function getTemperatureFertilityStatus(targetDateString) {
|
||||
const lastMensesStart = getLastMensesStart(targetDateString)
|
||||
if (!lastMensesStart) return formatStatusForApp({ detected: false })
|
||||
const previousTemperaturesInCycle = getPreviousTemperaturesInCycle(targetDateString, lastMensesStart)
|
||||
// we get temps with latest first, but sensiplan module expects latest last
|
||||
// we get temps with latest first, but sympto module expects latest last
|
||||
previousTemperaturesInCycle.reverse()
|
||||
const status = detectTemperatureShift(previousTemperaturesInCycle)
|
||||
return formatStatusForApp(status)
|
||||
@@ -1,9 +1,9 @@
|
||||
import chai from 'chai'
|
||||
import { detectTemperatureShift } from '../lib/sensiplan'
|
||||
import { detectTemperatureShift } from '../../lib/sympto/temperature'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
describe.only('sensiplan', () => {
|
||||
describe.only('sympto', () => {
|
||||
describe('detect temperature shift', () => {
|
||||
describe('regular rule', () => {
|
||||
it('reports lower temperature status before shift', function () {
|
||||
Reference in New Issue
Block a user