@@ -17,6 +17,7 @@ import { ReplicationTestContext } from "../Utils/ReplicationTestContext.js";
1717import { GenerateCertificateOperation } from "../Infrastructure/GenerateCertificateOperation.js" ;
1818import { assertThat } from "../Utils/AssertExtensions.js" ;
1919import { User } from "../Assets/Entities.js" ;
20+ import { addDays } from "date-fns" ;
2021
2122( RavenTestContext . isPullRequest ? describe . skip : describe ) ( "FilteredReplicationTest" , function ( ) {
2223
@@ -180,10 +181,10 @@ import { User } from "../Assets/Entities.js";
180181 . increment ( "test" ) ;
181182
182183 s . timeSeriesFor ( "users/pheobe" , HeartRateMeasure )
183- . append ( testContext . utcToday ( ) . toDate ( ) , HeartRateMeasure . create ( 34 ) , "test/things/out" ) ;
184+ . append ( testContext . utcToday ( ) , HeartRateMeasure . create ( 34 ) , "test/things/out" ) ;
184185
185186 s . timeSeriesFor ( "users/ayende" , HeartRateMeasure )
186- . append ( testContext . utcToday ( ) . toDate ( ) , HeartRateMeasure . create ( 55 ) , "test/things/out" ) ;
187+ . append ( testContext . utcToday ( ) , HeartRateMeasure . create ( 55 ) , "test/things/out" ) ;
187188
188189 s . advanced . attachments . store ( "users/ayende" , "test.bin" , Buffer . from ( "hello" ) ) ;
189190 s . advanced . attachments . store ( "users/pheobe" , "test.bin" , Buffer . from ( "hello" ) ) ;
@@ -263,7 +264,7 @@ import { User } from "../Assets/Entities.js";
263264 const s = storeB . openSession ( ) ;
264265 assertThat ( await s . load ( "users/pheobe" ) )
265266 . isNull ( ) ;
266- assertThat ( await s . advanced . revisions . get ( "users/pheobe" , testContext . utcToday ( ) . add ( 1 , "day" ) . toDate ( ) ) )
267+ assertThat ( await s . advanced . revisions . get ( "users/pheobe" , addDays ( testContext . utcToday ( ) , 1 ) ) )
267268 . isNull ( ) ;
268269 assertThat ( await s . countersFor ( "users/pheobe" ) . get ( "test" ) )
269270 . isNull ( ) ;
@@ -276,7 +277,7 @@ import { User } from "../Assets/Entities.js";
276277 . isNotNull ( ) ;
277278 assertThat ( await s . load ( "users/ayende" , User ) )
278279 . isNotNull ( ) ;
279- assertThat ( await s . advanced . revisions . get ( "users/ayende" , testContext . utcToday ( ) . add ( 1 , "day" ) . toDate ( ) ) )
280+ assertThat ( await s . advanced . revisions . get ( "users/ayende" , addDays ( testContext . utcToday ( ) , 1 ) ) )
280281 . isNotNull ( ) ;
281282 assertThat ( await s . countersFor ( "users/ayende" ) . get ( "test" ) )
282283 . isNotNull ( ) ;
@@ -306,7 +307,7 @@ import { User } from "../Assets/Entities.js";
306307 assertThat ( await s . load ( "users/ayende" , User ) )
307308 . isNotNull ( ) ;
308309
309- assertThat ( await s . advanced . revisions . get ( "users/ayende" , testContext . utcToday ( ) . add ( 1 , "day" ) . toDate ( ) ) )
310+ assertThat ( await s . advanced . revisions . get ( "users/ayende" , addDays ( testContext . utcToday ( ) , 1 ) ) )
310311 . isNotNull ( ) ;
311312
312313 assertThat ( await s . countersFor ( "users/ayende" ) . get ( "test" ) )
@@ -356,10 +357,10 @@ import { User } from "../Assets/Entities.js";
356357 . increment ( "test" ) ;
357358
358359 s . timeSeriesFor ( "users/pheobe" , HeartRateMeasure )
359- . append ( testContext . utcToday ( ) . toDate ( ) , HeartRateMeasure . create ( 34 ) , "test/things/out" ) ;
360+ . append ( testContext . utcToday ( ) , HeartRateMeasure . create ( 34 ) , "test/things/out" ) ;
360361
361362 s . timeSeriesFor ( "users/ayende" , HeartRateMeasure )
362- . append ( testContext . utcToday ( ) . toDate ( ) , HeartRateMeasure . create ( 55 ) , "test/things/out" ) ;
363+ . append ( testContext . utcToday ( ) , HeartRateMeasure . create ( 55 ) , "test/things/out" ) ;
363364
364365 s . advanced . attachments . store ( "users/ayende" , "test.bin" , Buffer . from ( "hello" ) ) ;
365366 s . advanced . attachments . store ( "users/pheobe" , "test.bin" , Buffer . from ( "hello" ) ) ;
@@ -440,7 +441,7 @@ import { User } from "../Assets/Entities.js";
440441 const s = storeB . openSession ( ) ;
441442 assertThat ( await s . load ( "users/pheobe" , User ) )
442443 . isNull ( ) ;
443- assertThat ( await s . advanced . revisions . get ( "users/pheobe" , testContext . utcToday ( ) . add ( 1 , "day" ) . toDate ( ) ) )
444+ assertThat ( await s . advanced . revisions . get ( "users/pheobe" , addDays ( testContext . utcToday ( ) , 1 ) ) )
444445 . isNull ( ) ;
445446 assertThat ( await s . countersFor ( "users/pheobe" ) . get ( "test" ) )
446447 . isNull ( ) ;
@@ -454,7 +455,7 @@ import { User } from "../Assets/Entities.js";
454455 . isNotNull ( ) ;
455456 assertThat ( await s . load ( "users/ayende" , User ) )
456457 . isNotNull ( ) ;
457- assertThat ( await s . advanced . revisions . get ( "users/ayende" , testContext . utcToday ( ) . add ( 1 , "day" ) . toDate ( ) ) )
458+ assertThat ( await s . advanced . revisions . get ( "users/ayende" , addDays ( testContext . utcToday ( ) , 1 ) ) )
458459 . isNotNull ( ) ;
459460 assertThat ( await s . countersFor ( "users/ayende" ) . get ( "test" ) )
460461 . isNotNull ( ) ;
@@ -484,7 +485,7 @@ import { User } from "../Assets/Entities.js";
484485 assertThat ( await s . load ( "users/ayende" , User ) )
485486 . isNotNull ( ) ;
486487
487- assertThat ( await s . advanced . revisions . get ( "users/ayende" , testContext . utcToday ( ) . add ( 1 , "day" ) . toDate ( ) ) )
488+ assertThat ( await s . advanced . revisions . get ( "users/ayende" , addDays ( testContext . utcToday ( ) , 1 ) ) )
488489 . isNotNull ( ) ;
489490
490491 assertThat ( await s . countersFor ( "users/ayende" ) . get ( "test" ) )
0 commit comments