File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,19 @@ test("Test TS Groups", async () => {
1111
1212 // Initialize the timeseries groups api with the default config
1313 const tsg_api = new TimeSeriesGroupsApi ( ) ;
14+
15+ const testOffice = "SWT" ;
16+
1417 // Fetch ALL timeseries groups for the given office
15- await tsg_api . getTimeSeriesGroup ( { office : "SWT" } ) . then ( ( data ) => {
16- expect ( data [ 0 ] ) . toBeDefined ( ) ;
17- data . forEach ( ( group ) => {
18- expect ( group . assignedTimeSeries ) . toBeDefined ( ) ;
19- const TSIDS = group . assignedTimeSeries . map ( ( ts ) => ts . timeseriesId ) ;
20- expect ( TSIDS ) . toBeDefined ( ) ;
21- console . log ( `Fetched ${ TSIDS . length } timeseries for group ${ group . id } ` ) ;
18+ await tsg_api
19+ . getTimeSeriesGroup ( { office : testOffice , includeAssigned : false } )
20+ . then ( ( data ) => {
21+ expect ( data [ 0 ] ) . toBeDefined ( ) ;
22+ data . forEach ( ( group ) => {
23+ expect ( group . officeId ) . toBeDefined ( ) ;
24+ } ) ;
25+ console . log ( `Fetched ${ data . length } groups for office ${ testOffice } ` ) ;
2226 } ) ;
23- } ) ;
2427
2528 // Fetch a specific timeseries groups given an ID for the given office
2629 await tsg_api
@@ -36,4 +39,4 @@ test("Test TS Groups", async () => {
3639 expect ( TSIDS ) . toBeDefined ( ) ;
3740 console . log ( `Fetched ${ TSIDS . length } timeseries for group ${ group . id } ` ) ;
3841 } ) ;
39- } , 20000 ) ;
42+ } ) ;
You can’t perform that action at this time.
0 commit comments