@@ -9,6 +9,7 @@ import { Employee } from "../../../Assets/Orders.js";
99import { Address , Company , User } from "../../../Assets/Entities.js" ;
1010import { assertThat } from "../../../Utils/AssertExtensions.js" ;
1111import { RavenTestHelper } from "../../../Utils/RavenTestHelper.js" ;
12+ import { addHours } from "date-fns" ;
1213
1314describe ( "BasicTimeSeriesIndexes_JavaScript" , function ( ) {
1415
@@ -105,7 +106,7 @@ describe("BasicTimeSeriesIndexes_JavaScript", function () {
105106
106107 for ( let i = 0 ; i < 10 ; i ++ ) {
107108 session . timeSeriesFor ( user , "heartRate" )
108- . append ( today . clone ( ) . add ( i , "hours" ) . toDate ( ) , 180 + i , address . id ) ;
109+ . append ( addHours ( today , i ) , 180 + i , address . id ) ;
109110 }
110111
111112 await session . saveChanges ( ) ;
@@ -191,14 +192,14 @@ describe("BasicTimeSeriesIndexes_JavaScript", function () {
191192 await session . store ( company ) ;
192193
193194 session . timeSeriesFor ( company , "heartRate" )
194- . append ( now . toDate ( ) , 2.5 , "tag1" ) ;
195+ . append ( now , 2.5 , "tag1" ) ;
195196 session . timeSeriesFor ( company , "heartRate2" )
196- . append ( now . toDate ( ) , 3.5 , "tag2" ) ;
197+ . append ( now , 3.5 , "tag2" ) ;
197198
198199 const user = new User ( ) ;
199200 await session . store ( user ) ;
200201 session . timeSeriesFor ( user , "heartRAte" )
201- . append ( now . toDate ( ) , 4.5 , "tag3" ) ;
202+ . append ( now , 4.5 , "tag3" ) ;
202203
203204 await session . saveChanges ( ) ;
204205 }
@@ -247,9 +248,9 @@ describe("BasicTimeSeriesIndexes_JavaScript", function () {
247248 const session = store . openSession ( ) ;
248249 const company = await session . load ( "companies/1" , Company ) ;
249250 session . timeSeriesFor ( company , "heartRate" )
250- . append ( now . toDate ( ) , 2.5 , "tag1" ) ;
251+ . append ( now , 2.5 , "tag1" ) ;
251252 session . timeSeriesFor ( company , "heartRate2" )
252- . append ( now . toDate ( ) , 3.5 , "tag2" ) ;
253+ . append ( now , 3.5 , "tag2" ) ;
253254
254255 await session . saveChanges ( ) ;
255256 }
0 commit comments