mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-16 23:40:32 +00:00
Remove correctness test, to be reimplemented at a later time
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
// Tests that run exclusively for the in-memory repo
|
||||
|
||||
import { beforeEach, describe, expect, it, jest } from "@jest/globals";
|
||||
import { InMemoryParkingRepository } from "../../src/repositories/parking/InMemoryParkingRepository";
|
||||
|
||||
describe("InMemoryParkingRepositoryTests", () => {
|
||||
let repository = new InMemoryParkingRepository();
|
||||
|
||||
beforeEach(() => {
|
||||
repository = new InMemoryParkingRepository();
|
||||
});
|
||||
|
||||
describe("getHistoricalAveragesOfParkingStructureCounts", () => {
|
||||
it("gets correct data for historical averages", async () => {
|
||||
// jest.useFakeTimers();
|
||||
// jest.setSystemTime(new Date());
|
||||
//
|
||||
// const parkingStructure = generateParkingStructures()[0];
|
||||
// parkingStructure.spotsAvailable = parkingStructure.capacity;
|
||||
// mockSystem.parkingRepository?.setLoggingInterval(100);
|
||||
//
|
||||
// // Simulate repeated updates
|
||||
// for (let i = 0; i < 6; i += 1) {
|
||||
// jest.setSystemTime(new Date(Date.now() + 1000));
|
||||
// parkingStructure.spotsAvailable = parkingStructure.spotsAvailable - 100;
|
||||
// parkingStructureCounts.push(parkingStructure.spotsAvailable);
|
||||
// await mockSystem.parkingRepository?.addOrUpdateParkingStructure(parkingStructure);
|
||||
// }
|
||||
|
||||
// TODO: Make these assertions for this repository
|
||||
// expect(historicalAverages[0].averageSpotsAvailable).toBeCloseTo((parkingStructureCounts[0] + parkingStructureCounts[1]) / 2);
|
||||
// expect(historicalAverages[1].averageSpotsAvailable).toBeCloseTo((parkingStructureCounts[2] + parkingStructureCounts[3]) / 2);
|
||||
// expect(historicalAverages[2].averageSpotsAvailable).toBeCloseTo((parkingStructureCounts[4] + parkingStructureCounts[5]) / 2);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user