diff --git a/components/cycle-day.js b/components/cycle-day.js index 5b54b2f..aafb099 100644 --- a/components/cycle-day.js +++ b/components/cycle-day.js @@ -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' diff --git a/lib/sensiplan-adapter.js b/lib/sympto-adapter.js similarity index 86% rename from lib/sensiplan-adapter.js rename to lib/sympto-adapter.js index 7ae60b3..12f0935 100644 --- a/lib/sensiplan-adapter.js +++ b/lib/sympto-adapter.js @@ -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) diff --git a/lib/sensiplan.js b/lib/sympto/temperature.js similarity index 100% rename from lib/sensiplan.js rename to lib/sympto/temperature.js diff --git a/test/sensiplan.spec.js b/test/sympto/temperature.spec.js similarity index 98% rename from test/sensiplan.spec.js rename to test/sympto/temperature.spec.js index f490a86..8646125 100644 --- a/test/sensiplan.spec.js +++ b/test/sympto/temperature.spec.js @@ -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 () {