11import { calculatePeriodUsage , storeSpaceUsage } from '../../lib/space-billing-queue.js'
2- import { startOfYesterday , startOfDay } from '../../lib/util.js'
2+ import { startOfYesterday , startOfToday } from '../../lib/util.js'
33import { randomConsumer } from '../helpers/consumer.js'
44import { randomCustomer } from '../helpers/customer.js'
55import { randomLink } from '../helpers/dag.js'
@@ -11,7 +11,7 @@ export const test = {
1111 const consumer = await randomConsumer ( )
1212 const now = new Date ( )
1313 const from = startOfYesterday ( now )
14- const to = startOfDay ( now )
14+ const to = startOfToday ( now )
1515 const delta = 1024 * 1024 * 1024 // 1GiB
1616
1717 await ctx . spaceDiffStore . batchPut ( [ {
@@ -64,7 +64,7 @@ export const test = {
6464 const consumer = await randomConsumer ( )
6565 const now = new Date ( )
6666 const from = startOfYesterday ( now )
67- const to = startOfDay ( now )
67+ const to = startOfToday ( now )
6868 const delta = 1024 * 1024 * 1024 // 1GiB
6969
7070 await ctx . spaceSnapshotStore . put ( {
@@ -140,7 +140,7 @@ export const test = {
140140 const size = BigInt ( 1024 * 1024 * 1024 * 1024 ) // 1TiB
141141 const now = new Date ( )
142142 const from = startOfYesterday ( now )
143- const to = startOfDay ( now )
143+ const to = startOfToday ( now )
144144 const delta = 1024 * 1024 * 1024 // 1GiB
145145
146146 await ctx . spaceSnapshotStore . put ( {
0 commit comments