@@ -13,6 +13,7 @@ import SystemPricingPlansTI from '../v3.1-RC2/test-type-checkers/system_pricing_
13
13
import SystemRegionsTI from "../v3.1-RC2/test-type-checkers/system_regions-ti" ;
14
14
import VehicleStatusTI from "../v3.1-RC2/test-type-checkers/vehicle_status-ti" ;
15
15
import VehicleTypesTI from '../v3.1-RC2/test-type-checkers/vehicle_types-ti' ;
16
+ import VehicleAvailabilityTI from '../v3.1-RC2/test-type-checkers/vehicle_availability-ti' ;
16
17
17
18
// checkers
18
19
const { GbfsVersions } = createCheckers ( GbfsVersionsTI ) ;
@@ -27,6 +28,7 @@ const { SystemPricingPlans } = createCheckers(SystemPricingPlansTI);
27
28
const { SystemRegions } = createCheckers ( SystemRegionsTI ) ;
28
29
const { VehicleStatus } = createCheckers ( VehicleStatusTI ) ;
29
30
const { VehicleTypes } = createCheckers ( VehicleTypesTI ) ;
31
+ const { VehicleAvailability } = createCheckers ( VehicleAvailabilityTI ) ;
30
32
31
33
// json test data: these are gbfs with no errors for v3.1-RC2
32
34
import gbfsVersionsJson from '../../../testFixtures/v3.1-RC2/gbfs_versions.json' ;
@@ -44,6 +46,7 @@ import systemRegionsJson from '../../../testFixtures/v3.1-RC2/system_regions.jso
44
46
import vehicleStatusCarsharingJson from '../../../testFixtures/v3.1-RC2/vehicle_status_carsharing.json' ;
45
47
import vehicleStatusMicromobilityJson from '../../../testFixtures/v3.1-RC2/vehicle_status_micromobility.json' ;
46
48
import vehicleTypesJson from '../../../testFixtures/v3.1-RC2/vehicle_types.json' ;
49
+ import vehicleAvailabilityJson from '../../../testFixtures/v3.1-RC2/vehicle_availability.json' ;
47
50
48
51
// Date objects cannot be represented in JSON
49
52
// Manual checks for dates are required
@@ -137,4 +140,10 @@ describe('GBFS Validator v3.1-RC2', () => {
137
140
VehicleTypes . check ( vehicleTypesJson ) ;
138
141
} ) . not . toThrow ( ) ;
139
142
} ) ;
143
+
144
+ it ( 'should check if vehicle_availability is valid' , ( ) => {
145
+ expect ( ( ) => {
146
+ VehicleAvailability . check ( vehicleAvailabilityJson ) ;
147
+ } ) . not . toThrow ( ) ;
148
+ } ) ;
140
149
} ) ;
0 commit comments