gtfs 3.1.0 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/.eslintrc.json +14 -19
  2. package/.husky/pre-commit +4 -0
  3. package/.prettierrc.js +4 -0
  4. package/CHANGELOG.md +173 -0
  5. package/README.md +115 -126
  6. package/bin/gtfs-export.js +4 -5
  7. package/bin/gtfs-import.js +6 -7
  8. package/config-sample-full.json +2 -7
  9. package/lib/db.js +4 -2
  10. package/lib/export.js +26 -9
  11. package/lib/file-utils.js +26 -9
  12. package/lib/geojson-utils.js +51 -38
  13. package/lib/gtfs/agencies.js +8 -2
  14. package/lib/gtfs/attributions.js +8 -2
  15. package/lib/gtfs/calendar-dates.js +8 -2
  16. package/lib/gtfs/calendars.js +8 -2
  17. package/lib/gtfs/fare-attributes.js +8 -2
  18. package/lib/gtfs/fare-rules.js +8 -2
  19. package/lib/gtfs/feed-info.js +8 -2
  20. package/lib/gtfs/frequencies.js +8 -2
  21. package/lib/gtfs/levels.js +8 -2
  22. package/lib/gtfs/pathways.js +8 -2
  23. package/lib/gtfs/routes.js +15 -4
  24. package/lib/gtfs/shapes.js +49 -18
  25. package/lib/gtfs/stop-times.js +8 -2
  26. package/lib/gtfs/stops.js +45 -16
  27. package/lib/gtfs/transfers.js +8 -2
  28. package/lib/gtfs/translations.js +8 -2
  29. package/lib/gtfs/trips.js +8 -2
  30. package/lib/gtfs-ride/board-alights.js +8 -2
  31. package/lib/gtfs-ride/ride-feed-infos.js +8 -2
  32. package/lib/gtfs-ride/rider-trips.js +8 -2
  33. package/lib/gtfs-ride/riderships.js +8 -2
  34. package/lib/gtfs-ride/trip-capacities.js +8 -2
  35. package/lib/import.js +200 -125
  36. package/lib/log-utils.js +8 -4
  37. package/lib/non-standard/directions.js +8 -2
  38. package/lib/non-standard/stop-attributes.js +8 -2
  39. package/lib/non-standard/timetable-notes-references.js +13 -3
  40. package/lib/non-standard/timetable-notes.js +8 -2
  41. package/lib/non-standard/timetable-pages.js +8 -2
  42. package/lib/non-standard/timetable-stop-order.js +13 -3
  43. package/lib/non-standard/timetables.js +8 -2
  44. package/lib/utils.js +22 -11
  45. package/models/gtfs/agency.js +11 -11
  46. package/models/gtfs/attributions.js +14 -14
  47. package/models/gtfs/calendar-dates.js +7 -7
  48. package/models/gtfs/calendar.js +12 -12
  49. package/models/gtfs/fare-attributes.js +9 -9
  50. package/models/gtfs/fare-rules.js +8 -8
  51. package/models/gtfs/feed-info.js +12 -12
  52. package/models/gtfs/frequencies.js +10 -10
  53. package/models/gtfs/levels.js +5 -5
  54. package/models/gtfs/pathways.js +14 -14
  55. package/models/gtfs/routes.js +14 -14
  56. package/models/gtfs/shapes.js +8 -8
  57. package/models/gtfs/stop-times.js +17 -17
  58. package/models/gtfs/stops.js +17 -17
  59. package/models/gtfs/transfers.js +7 -7
  60. package/models/gtfs/translations.js +10 -10
  61. package/models/gtfs/trips.js +12 -12
  62. package/models/gtfs-ride/board-alight.js +24 -24
  63. package/models/gtfs-ride/ride-feed-info.js +8 -8
  64. package/models/gtfs-ride/rider-trip.js +21 -21
  65. package/models/gtfs-ride/ridership.js +23 -23
  66. package/models/gtfs-ride/trip-capacity.js +10 -10
  67. package/models/models.js +1 -1
  68. package/models/non-standard/directions.js +6 -6
  69. package/models/non-standard/stop-attributes.js +5 -5
  70. package/models/non-standard/timetable-notes-references.js +9 -9
  71. package/models/non-standard/timetable-notes.js +5 -5
  72. package/models/non-standard/timetable-pages.js +5 -5
  73. package/models/non-standard/timetable-stop-order.js +6 -6
  74. package/models/non-standard/timetables.js +27 -27
  75. package/package.json +29 -11
  76. package/test/mocha/export-gtfs.js +63 -40
  77. package/test/mocha/get-agencies.js +11 -11
  78. package/test/mocha/get-attributions.js +1 -1
  79. package/test/mocha/get-board-alights.js +1 -1
  80. package/test/mocha/get-calendar-dates.js +22 -21
  81. package/test/mocha/get-calendars.js +8 -8
  82. package/test/mocha/get-db.js +9 -2
  83. package/test/mocha/get-directions.js +1 -1
  84. package/test/mocha/get-fare-attributes.js +3 -3
  85. package/test/mocha/get-fare-rules.js +8 -10
  86. package/test/mocha/get-feed-info.js +1 -1
  87. package/test/mocha/get-frequencies.js +1 -1
  88. package/test/mocha/get-levels.js +1 -1
  89. package/test/mocha/get-pathways.js +1 -1
  90. package/test/mocha/get-rider-trips.js +1 -1
  91. package/test/mocha/get-riderships.js +1 -1
  92. package/test/mocha/get-routes.js +9 -13
  93. package/test/mocha/get-shapes-as-geojson.js +3 -3
  94. package/test/mocha/get-shapes.js +28 -36
  95. package/test/mocha/get-stop-attributes.js +1 -1
  96. package/test/mocha/get-stops-as-geojson.js +2 -2
  97. package/test/mocha/get-stops.js +59 -48
  98. package/test/mocha/get-stoptimes.js +9 -7
  99. package/test/mocha/get-timetable-pages.js +1 -1
  100. package/test/mocha/get-timetable-stop-orders.js +1 -1
  101. package/test/mocha/get-timetables.js +1 -1
  102. package/test/mocha/get-transfers.js +1 -1
  103. package/test/mocha/get-translations.js +1 -1
  104. package/test/mocha/get-trip-capacities.js +1 -1
  105. package/test/mocha/get-trips.js +3 -3
  106. package/test/mocha/import-gtfs.js +59 -42
  107. package/test/test-config.js +9 -4
@@ -20,18 +20,14 @@ describe('getRoutes():', () => {
20
20
  const routeId = 'fake-route-id';
21
21
 
22
22
  const results = await getRoutes({
23
- route_id: routeId
23
+ route_id: routeId,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
27
27
  });
28
28
 
29
29
  it('should return expected routes', async () => {
30
- const results = await getRoutes(
31
- {},
32
- [],
33
- [['route_long_name', 'ASC']]
34
- );
30
+ const results = await getRoutes({}, [], [['route_long_name', 'ASC']]);
35
31
 
36
32
  const expectedResults = [
37
33
  {
@@ -46,7 +42,7 @@ describe('getRoutes():', () => {
46
42
  route_text_color: null,
47
43
  route_sort_order: null,
48
44
  continuous_pickup: null,
49
- continuous_drop_off: null
45
+ continuous_drop_off: null,
50
46
  },
51
47
  {
52
48
  route_id: 'Li-16APR',
@@ -60,7 +56,7 @@ describe('getRoutes():', () => {
60
56
  route_text_color: null,
61
57
  route_sort_order: null,
62
58
  continuous_pickup: null,
63
- continuous_drop_off: null
59
+ continuous_drop_off: null,
64
60
  },
65
61
  {
66
62
  route_id: 'Lo-16APR',
@@ -74,7 +70,7 @@ describe('getRoutes():', () => {
74
70
  route_text_color: null,
75
71
  route_sort_order: null,
76
72
  continuous_pickup: null,
77
- continuous_drop_off: null
73
+ continuous_drop_off: null,
78
74
  },
79
75
  {
80
76
  route_id: 'TaSj-16APR',
@@ -88,8 +84,8 @@ describe('getRoutes():', () => {
88
84
  route_text_color: null,
89
85
  route_sort_order: null,
90
86
  continuous_pickup: null,
91
- continuous_drop_off: null
92
- }
87
+ continuous_drop_off: null,
88
+ },
93
89
  ];
94
90
 
95
91
  should.exist(results);
@@ -117,8 +113,8 @@ describe('getRoutes():', () => {
117
113
  route_text_color: null,
118
114
  route_sort_order: null,
119
115
  continuous_pickup: null,
120
- continuous_drop_off: null
121
- }
116
+ continuous_drop_off: null,
117
+ },
122
118
  ];
123
119
 
124
120
  should.exist(results);
@@ -19,7 +19,7 @@ describe('getShapesAsGeoJSON():', () => {
19
19
  it('should return geojson with an empty features array if no shapes exist', async () => {
20
20
  const shapeId = 'fake-shape-id';
21
21
  const geojson = await getShapesAsGeoJSON({
22
- shape_id: shapeId
22
+ shape_id: shapeId,
23
23
  });
24
24
 
25
25
  should.exist(geojson);
@@ -42,7 +42,7 @@ describe('getShapesAsGeoJSON():', () => {
42
42
  const routeId = 'Lo-16APR';
43
43
 
44
44
  const geojson = await getShapesAsGeoJSON({
45
- route_id: routeId
45
+ route_id: routeId,
46
46
  });
47
47
 
48
48
  should.exist(geojson);
@@ -59,7 +59,7 @@ describe('getShapesAsGeoJSON():', () => {
59
59
 
60
60
  const geojson = await getShapesAsGeoJSON({
61
61
  route_id: routeId,
62
- direction_id: directionId
62
+ direction_id: directionId,
63
63
  });
64
64
 
65
65
  should.exist(geojson);
@@ -20,7 +20,7 @@ describe('getShapes():', () => {
20
20
  const shapeId = 'fake-shape-id';
21
21
 
22
22
  const results = await getShapes({
23
- shape_id: shapeId
23
+ shape_id: shapeId,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
@@ -32,30 +32,27 @@ describe('getShapes():', () => {
32
32
 
33
33
  const results = await getShapes({
34
34
  route_id: routeId,
35
- service_id: serviceId
35
+ service_id: serviceId,
36
36
  });
37
37
  should.exists(results);
38
38
  results.should.have.length(0);
39
39
  });
40
40
 
41
41
  it('should return array of shapes', async () => {
42
- const results = await getShapes(
43
- {},
44
- [
45
- 'shape_id',
46
- 'shape_pt_lat',
47
- 'shape_pt_lon',
48
- 'shape_pt_sequence',
49
- 'shape_dist_traveled'
50
- ]
51
- );
42
+ const results = await getShapes({}, [
43
+ 'shape_id',
44
+ 'shape_pt_lat',
45
+ 'shape_pt_lon',
46
+ 'shape_pt_sequence',
47
+ 'shape_dist_traveled',
48
+ ]);
52
49
 
53
50
  const expectedResult = {
54
51
  shape_id: 'cal_tam_sf',
55
52
  shape_pt_lat: 37.607_687_113_495_64,
56
53
  shape_pt_lon: -122.394_679_784_774_78,
57
54
  shape_pt_sequence: 244,
58
- shape_dist_traveled: null
55
+ shape_dist_traveled: null,
59
56
  };
60
57
 
61
58
  should.exist(results);
@@ -67,14 +64,14 @@ describe('getShapes():', () => {
67
64
  const routeId = 'TaSj-16APR';
68
65
  const results = await getShapes(
69
66
  {
70
- route_id: routeId
67
+ route_id: routeId,
71
68
  },
72
69
  [
73
70
  'shape_id',
74
71
  'shape_pt_lat',
75
72
  'shape_pt_lon',
76
73
  'shape_pt_sequence',
77
- 'shape_dist_traveled'
74
+ 'shape_dist_traveled',
78
75
  ]
79
76
  );
80
77
 
@@ -83,7 +80,7 @@ describe('getShapes():', () => {
83
80
  shape_pt_lat: 37.323558,
84
81
  shape_pt_lon: -121.8919,
85
82
  shape_pt_sequence: 10051,
86
- shape_dist_traveled: null
83
+ shape_dist_traveled: null,
87
84
  };
88
85
 
89
86
  should.exist(results);
@@ -94,17 +91,14 @@ describe('getShapes():', () => {
94
91
  it('should return array of shapes for multiple routes', async () => {
95
92
  const results = await getShapes(
96
93
  {
97
- route_id: [
98
- 'Lo-16APR',
99
- 'Li-16APR'
100
- ]
94
+ route_id: ['Lo-16APR', 'Li-16APR'],
101
95
  },
102
96
  [
103
97
  'shape_id',
104
98
  'shape_pt_lat',
105
99
  'shape_pt_lon',
106
100
  'shape_pt_sequence',
107
- 'shape_dist_traveled'
101
+ 'shape_dist_traveled',
108
102
  ]
109
103
  );
110
104
 
@@ -113,7 +107,7 @@ describe('getShapes():', () => {
113
107
  shape_pt_lat: 37.694_407_548_683_614,
114
108
  shape_pt_lon: -122.401_739_358_901_98,
115
109
  shape_pt_sequence: 306,
116
- shape_dist_traveled: null
110
+ shape_dist_traveled: null,
117
111
  };
118
112
 
119
113
  should.exist(results);
@@ -122,11 +116,9 @@ describe('getShapes():', () => {
122
116
  });
123
117
 
124
118
  it('should return empty array of for invalid route', async () => {
125
- const results = await getShapes(
126
- {
127
- route_id: 'not-valid'
128
- }
129
- );
119
+ const results = await getShapes({
120
+ route_id: 'not-valid',
121
+ });
130
122
 
131
123
  should.exist(results);
132
124
  results.length.should.equal(0);
@@ -138,14 +130,14 @@ describe('getShapes():', () => {
138
130
  const results = await getShapes(
139
131
  {
140
132
  route_id: routeId,
141
- direction_id: directionId
133
+ direction_id: directionId,
142
134
  },
143
135
  [
144
136
  'shape_id',
145
137
  'shape_pt_lat',
146
138
  'shape_pt_lon',
147
139
  'shape_pt_sequence',
148
- 'shape_dist_traveled'
140
+ 'shape_dist_traveled',
149
141
  ]
150
142
  );
151
143
 
@@ -154,7 +146,7 @@ describe('getShapes():', () => {
154
146
  shape_pt_lat: 37.323558,
155
147
  shape_pt_lon: -121.8919,
156
148
  shape_pt_sequence: 10051,
157
- shape_dist_traveled: null
149
+ shape_dist_traveled: null,
158
150
  };
159
151
 
160
152
  should.exist(results);
@@ -166,14 +158,14 @@ describe('getShapes():', () => {
166
158
  const tripId = '329';
167
159
  const results = await getShapes(
168
160
  {
169
- trip_id: tripId
161
+ trip_id: tripId,
170
162
  },
171
163
  [
172
164
  'shape_id',
173
165
  'shape_pt_lat',
174
166
  'shape_pt_lon',
175
167
  'shape_pt_sequence',
176
- 'shape_dist_traveled'
168
+ 'shape_dist_traveled',
177
169
  ]
178
170
  );
179
171
 
@@ -182,7 +174,7 @@ describe('getShapes():', () => {
182
174
  shape_pt_lat: 37.337_664_044_379_544,
183
175
  shape_pt_lon: -121.908_105_611_801_15,
184
176
  shape_pt_sequence: 25,
185
- shape_dist_traveled: null
177
+ shape_dist_traveled: null,
186
178
  };
187
179
 
188
180
  should.exist(results);
@@ -194,14 +186,14 @@ describe('getShapes():', () => {
194
186
  const serviceId = 'CT-16APR-Caltrain-Sunday-02';
195
187
  const results = await getShapes(
196
188
  {
197
- service_id: serviceId
189
+ service_id: serviceId,
198
190
  },
199
191
  [
200
192
  'shape_id',
201
193
  'shape_pt_lat',
202
194
  'shape_pt_lon',
203
195
  'shape_pt_sequence',
204
- 'shape_dist_traveled'
196
+ 'shape_dist_traveled',
205
197
  ]
206
198
  );
207
199
 
@@ -210,7 +202,7 @@ describe('getShapes():', () => {
210
202
  shape_pt_lat: 37.294079,
211
203
  shape_pt_lon: -121.874108,
212
204
  shape_pt_sequence: 10154,
213
- shape_dist_traveled: null
205
+ shape_dist_traveled: null,
214
206
  };
215
207
 
216
208
  should.exist(results);
@@ -20,7 +20,7 @@ describe('getStopAttributes():', () => {
20
20
  const stopId = 'fake-stop-id';
21
21
 
22
22
  const results = await getStopAttributes({
23
- stop_id: stopId
23
+ stop_id: stopId,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
@@ -19,7 +19,7 @@ describe('getStopsAsGeoJSON(): ', () => {
19
19
  it('should return geojson with an empty features array if no stops exist', async () => {
20
20
  const stopId = 'fake-stop-id';
21
21
  const geojson = await getStopsAsGeoJSON({
22
- stop_id: stopId
22
+ stop_id: stopId,
23
23
  });
24
24
 
25
25
  should.exist(geojson);
@@ -41,7 +41,7 @@ describe('getStopsAsGeoJSON(): ', () => {
41
41
  const stopId = '70031';
42
42
 
43
43
  const geojson = await getStopsAsGeoJSON({
44
- stop_id: stopId
44
+ stop_id: stopId,
45
45
  });
46
46
 
47
47
  should.exist(geojson);
@@ -20,7 +20,7 @@ describe('getStops():', () => {
20
20
  const stopId = 'fake-stop-id';
21
21
 
22
22
  const results = await getStops({
23
- stop_id: stopId
23
+ stop_id: stopId,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
@@ -44,7 +44,7 @@ describe('getStops():', () => {
44
44
  stop_timezone: null,
45
45
  wheelchair_boarding: 1,
46
46
  level_id: null,
47
- platform_code: null
47
+ platform_code: null,
48
48
  };
49
49
 
50
50
  should.exist(results);
@@ -56,26 +56,28 @@ describe('getStops():', () => {
56
56
  const stopId = '70031';
57
57
 
58
58
  const results = await getStops({
59
- stop_id: stopId
59
+ stop_id: stopId,
60
60
  });
61
61
 
62
- const expectedResult = [{
63
- stop_id: '70031',
64
- stop_code: '70031',
65
- stop_name: 'Bayshore Caltrain',
66
- tts_stop_name: null,
67
- stop_desc: null,
68
- stop_lat: 37.709537,
69
- stop_lon: -122.401586,
70
- zone_id: '1',
71
- stop_url: 'http://www.caltrain.com/stations/bayshorestation.html',
72
- location_type: 0,
73
- parent_station: 'ctba',
74
- stop_timezone: null,
75
- wheelchair_boarding: 1,
76
- level_id: null,
77
- platform_code: 'NB'
78
- }];
62
+ const expectedResult = [
63
+ {
64
+ stop_id: '70031',
65
+ stop_code: '70031',
66
+ stop_name: 'Bayshore Caltrain',
67
+ tts_stop_name: null,
68
+ stop_desc: null,
69
+ stop_lat: 37.709537,
70
+ stop_lon: -122.401586,
71
+ zone_id: '1',
72
+ stop_url: 'http://www.caltrain.com/stations/bayshorestation.html',
73
+ location_type: 0,
74
+ parent_station: 'ctba',
75
+ stop_timezone: null,
76
+ wheelchair_boarding: 1,
77
+ level_id: null,
78
+ platform_code: 'NB',
79
+ },
80
+ ];
79
81
 
80
82
  should.exist(results);
81
83
  results.length.should.equal(1);
@@ -85,13 +87,13 @@ describe('getStops():', () => {
85
87
  it('should return array of stops if it exists for a specific route_id', async () => {
86
88
  const routeId = 'Bu-16APR';
87
89
 
88
- const results = await getStops({
89
- route_id: routeId
90
- },
91
- [],
92
- [
93
- ['stop_id', 'ASC']
94
- ]);
90
+ const results = await getStops(
91
+ {
92
+ route_id: routeId,
93
+ },
94
+ [],
95
+ [['stop_id', 'ASC']]
96
+ );
95
97
 
96
98
  const expectedStopIds = [
97
99
  '70011',
@@ -117,13 +119,16 @@ describe('getStops():', () => {
117
119
  '70261',
118
120
  '70262',
119
121
  '70271',
120
- '70272'
122
+ '70272',
121
123
  ];
122
124
 
123
125
  should.exist(results);
124
126
  results.length.should.equal(24);
125
127
  for (const [idx, stop] of results.entries()) {
126
- expectedStopIds[idx].should.equal(stop.stop_id, 'The order of stops are expected to be the same');
128
+ expectedStopIds[idx].should.equal(
129
+ stop.stop_id,
130
+ 'The order of stops are expected to be the same'
131
+ );
127
132
  }
128
133
  });
129
134
 
@@ -131,14 +136,14 @@ describe('getStops():', () => {
131
136
  const routeId = 'Bu-16APR';
132
137
  const directionId = 1;
133
138
 
134
- const results = await getStops({
135
- route_id: routeId,
136
- direction_id: directionId
137
- },
138
- [],
139
- [
140
- ['stop_id', 'ASC']
141
- ]);
139
+ const results = await getStops(
140
+ {
141
+ route_id: routeId,
142
+ direction_id: directionId,
143
+ },
144
+ [],
145
+ [['stop_id', 'ASC']]
146
+ );
142
147
 
143
148
  const expectedStopIds = [
144
149
  '70012',
@@ -152,26 +157,29 @@ describe('getStops():', () => {
152
157
  '70212',
153
158
  '70222',
154
159
  '70262',
155
- '70272'
160
+ '70272',
156
161
  ];
157
162
 
158
163
  should.exist(results);
159
164
  results.length.should.equal(12);
160
165
  for (const [idx, stop] of results.entries()) {
161
- expectedStopIds[idx].should.equal(stop.stop_id, 'The order of stops are expected to be the same');
166
+ expectedStopIds[idx].should.equal(
167
+ stop.stop_id,
168
+ 'The order of stops are expected to be the same'
169
+ );
162
170
  }
163
171
  });
164
172
 
165
173
  it('should return array of stops for a specific trip_id', async () => {
166
174
  const tripId = '427a';
167
175
 
168
- const results = await getStops({
169
- trip_id: tripId
170
- },
171
- [],
172
- [
173
- ['stop_id', 'ASC']
174
- ]);
176
+ const results = await getStops(
177
+ {
178
+ trip_id: tripId,
179
+ },
180
+ [],
181
+ [['stop_id', 'ASC']]
182
+ );
175
183
 
176
184
  const expectedStopIds = [
177
185
  '70011',
@@ -197,13 +205,16 @@ describe('getStops():', () => {
197
205
  '70221',
198
206
  '70231',
199
207
  '70241',
200
- '70261'
208
+ '70261',
201
209
  ];
202
210
 
203
211
  should.exist(results);
204
212
  results.length.should.equal(24);
205
213
  for (const [idx, stop] of results.entries()) {
206
- expectedStopIds[idx].should.equal(stop.stop_id, 'The order of stops are expected to be the same');
214
+ expectedStopIds[idx].should.equal(
215
+ stop.stop_id,
216
+ 'The order of stops are expected to be the same'
217
+ );
207
218
  }
208
219
  });
209
220
  });
@@ -20,7 +20,7 @@ describe('getStoptimes():', () => {
20
20
  const stopId = 'fake-stop-id';
21
21
 
22
22
  const results = await getStoptimes({
23
- stop_id: stopId
23
+ stop_id: stopId,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
@@ -30,7 +30,7 @@ describe('getStoptimes():', () => {
30
30
  const stopId = '70011';
31
31
 
32
32
  const results = await getStoptimes({
33
- stop_id: stopId
33
+ stop_id: stopId,
34
34
  });
35
35
  should.exist(results);
36
36
  results.should.have.length(80);
@@ -43,11 +43,13 @@ describe('getStoptimes():', () => {
43
43
  it('should return array of stoptimes for given trip_id ordered by stop_sequence', async () => {
44
44
  const tripId = '421a';
45
45
 
46
- const results = await getStoptimes({
47
- trip_id: tripId
48
- }, [], [
49
- ['stop_sequence', 'ASC']
50
- ]);
46
+ const results = await getStoptimes(
47
+ {
48
+ trip_id: tripId,
49
+ },
50
+ [],
51
+ [['stop_sequence', 'ASC']]
52
+ );
51
53
 
52
54
  should.exist(results);
53
55
  results.should.have.length(24);
@@ -20,7 +20,7 @@ describe('getTimetablePages():', () => {
20
20
  const timetablePageId = 'fake-timetable-page-id';
21
21
 
22
22
  const results = await getTimetablePages({
23
- timetable_page_id: timetablePageId
23
+ timetable_page_id: timetablePageId,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
@@ -20,7 +20,7 @@ describe('getTimetableStopOrders():', () => {
20
20
  const timetableId = 'fake-timetable-id';
21
21
 
22
22
  const results = await getTimetableStopOrders({
23
- timetable_id: timetableId
23
+ timetable_id: timetableId,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
@@ -20,7 +20,7 @@ describe('getTimetables():', () => {
20
20
  const timetableId = 'fake-timetable-id';
21
21
 
22
22
  const results = await getTimetables({
23
- timetable_id: timetableId
23
+ timetable_id: timetableId,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
@@ -20,7 +20,7 @@ describe('getTransfers():', () => {
20
20
  const fromStopId = 'fake-stop-id';
21
21
 
22
22
  const results = await getTransfers({
23
- from_stop_id: fromStopId
23
+ from_stop_id: fromStopId,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
@@ -20,7 +20,7 @@ describe('getTranslations():', () => {
20
20
  const fieldName = 'fake-field-name';
21
21
 
22
22
  const results = await getTranslations({
23
- field_name: fieldName
23
+ field_name: fieldName,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
@@ -20,7 +20,7 @@ describe('getTripCapacities():', () => {
20
20
  const tripId = 'fake-trip-id';
21
21
 
22
22
  const results = await getTripCapacities({
23
- trip_id: tripId
23
+ trip_id: tripId,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
@@ -20,7 +20,7 @@ describe('getTrips():', () => {
20
20
  const tripId = 'fake-trip-id';
21
21
 
22
22
  const results = await getTrips({
23
- trip_id: tripId
23
+ trip_id: tripId,
24
24
  });
25
25
  should.exists(results);
26
26
  results.should.have.length(0);
@@ -30,7 +30,7 @@ describe('getTrips():', () => {
30
30
  const routeId = 'Bu-16APR';
31
31
 
32
32
  const results = await getTrips({
33
- route_id: routeId
33
+ route_id: routeId,
34
34
  });
35
35
 
36
36
  const expectedResult = {
@@ -43,7 +43,7 @@ describe('getTrips():', () => {
43
43
  block_id: null,
44
44
  shape_id: 'cal_tam_sf',
45
45
  wheelchair_accessible: 1,
46
- bikes_allowed: 1
46
+ bikes_allowed: 1,
47
47
  };
48
48
 
49
49
  should.exists(results);