-
Notifications
You must be signed in to change notification settings - Fork 0
Unit Testing: CBT Context Report V3
goldyuva edited this page Jun 9, 2023
·
2 revisions
import AsyncStorage from "@react-native-async-storage/async-storage";
import { Value } from "react-native-reanimated";
import { CBTReportContext } from "../../../src/architecture/business_layer/modules/CBTReportContext";
import { ActiveFill } from "../../../src/architecture/business_layer/modules/ReportStrategies/ActiveFill";
import { BodyPartSelection, bodyParts } from "../../../src/architecture/business_layer/modules/ReportStrategies/BodyPartSelection";
import { DType, getValueofCBTReport, wipe_guest, removeValueofCBTReport, saveValueofCBTReport } from "../../../src/architecture/data_access_layer/local_storage"; describe("Active Fill Summary tests", () => {
beforeEach(()=>{
wipe_guest();
});
test('checking get summary with two reports', () =>{
const date = new Date(Date.now());
const fill = new ActiveFill("feeling good");
expect(fill.getSummary())
.toBe(fill.getSummary());
});
});When the system has two reports in it' and we try to read a report, we want it to be the same as the last report we gave it.
Therefore' we expect to get the same report back as we gave.