mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
Rename query interface for historical data
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { afterEach, beforeEach, describe, expect, it, jest } from "@jest/globals";
|
||||
import { InMemoryParkingRepository, } from "../../src/repositories/parking/InMemoryParkingRepository";
|
||||
import { IParkingStructure } from "../../src/entities/ParkingRepositoryEntities";
|
||||
import { ParkingStructureCountOptions } from "../../src/repositories/parking/ParkingGetterRepository";
|
||||
import { HistoricalParkingAverageQueryArguments } from "../../src/repositories/parking/ParkingGetterRepository";
|
||||
import { ParkingGetterSetterRepository } from "../../src/repositories/parking/ParkingGetterSetterRepository";
|
||||
import { RedisParkingRepository } from "../../src/repositories/parking/RedisParkingRepository";
|
||||
|
||||
@@ -151,7 +151,7 @@ describe.each(repositoryImplementations)('$name', (holder) => {
|
||||
|
||||
describe("getHistoricalAveragesOfParkingStructureCounts", () => {
|
||||
it("should return empty array for non-existent structure or no data", async () => {
|
||||
const options: ParkingStructureCountOptions = {
|
||||
const options: HistoricalParkingAverageQueryArguments = {
|
||||
from: new Date(1000),
|
||||
to: new Date(2000),
|
||||
intervalMs: 500
|
||||
@@ -182,7 +182,7 @@ describe.each(repositoryImplementations)('$name', (holder) => {
|
||||
}
|
||||
|
||||
const now = Date.now();
|
||||
const options: ParkingStructureCountOptions = {
|
||||
const options: HistoricalParkingAverageQueryArguments = {
|
||||
from: new Date(now - 10000), // Look back 10 seconds
|
||||
to: new Date(now + 10000), // Look forward 10 seconds
|
||||
intervalMs: 20000 // Single large interval
|
||||
|
||||
Reference in New Issue
Block a user