Przeglądaj źródła

Remove error check not in JS

Sam King 10 miesięcy temu
rodzic
commit
9b90599504

+ 0 - 3
Trio/Sources/APS/OpenAPSSwift/DetermineBasal/DetermineBasalGenerator.swift

@@ -278,9 +278,6 @@ enum DeterminationGenerator {
         if glucoseStatus.glucose < 39 || glucoseStatus.glucose > 600 {
             throw DeterminationError.glucoseOutOfRange(glucose: glucoseStatus.glucose)
         }
-        if glucoseStatus.delta == 0 {
-            throw DeterminationError.noDelta
-        }
         guard let _ = iobData else {
             throw DeterminationError.missingIob
         }

+ 2 - 2
TrioTests/OpenAPSSwiftTests/DetermineBasalJsonTests.swift

@@ -97,13 +97,13 @@ import Testing
         #expect(comparison.resultType == .matching)
     }
 
-    @Test("Format determineBasal inputs for running in JS", .enabled(if: true)) func formatInputs() async throws {
+    @Test("Format determineBasal inputs for running in JS", .enabled(if: false)) func formatInputs() async throws {
         let openAps = OpenAPSFixed()
 
         // this test is meant for one-off analysis so it's ok to hard code
         // a file, just make sure to _not_ check in updates to this to
         // avoid polluting our change logs
-        let algorithmComparison = try await HttpFiles.downloadFile(at: "/files/9cd14347-cef1-4ff0-bb79-2ae45c440951.1.json")
+        let algorithmComparison = try await HttpFiles.downloadFile(at: "/files/f1d04efa-c39b-4f0a-9955-65ab663ff9fb.0.json")
         let determineBasalInput = algorithmComparison.determineBasalInput!
 
         let encoder = JSONCoding.encoder