@transportme/load-ptv-gtfs 1.3.1 → 1.3.2
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.
- package/lib/loader/TripLoader.mjs +4 -1
- package/package.json +1 -1
- package/test/gtfs-stop-times.test.mjs +3 -3
- package/test/gtfs-trip-loader.test.mjs +5 -2
- package/test/sample-data/trips/stop_times.txt +28 -28
- package/test/sample-data/trips/stops.txt +93 -8
- package/test/set-stop-services.test.mjs +4 -4
|
@@ -119,7 +119,10 @@ export default class TripLoader {
|
|
|
119
119
|
stopDistance: stop.distanceTravelled
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
if (bay.platform)
|
|
122
|
+
if (bay.platform) {
|
|
123
|
+
if (bay.parentStopGTFSID) data.stopGTFSID = bay.parentStopGTFSID
|
|
124
|
+
data.platform = bay.platform
|
|
125
|
+
}
|
|
123
126
|
|
|
124
127
|
return data
|
|
125
128
|
})
|
package/package.json
CHANGED
|
@@ -17,10 +17,10 @@ describe('The GTFSStopTimesReader class', () => {
|
|
|
17
17
|
let stopTimes = await reader.getNextEntity()
|
|
18
18
|
expect(stopTimes.tripID).to.equal('02-ALM--12-T5-2000')
|
|
19
19
|
expect(stopTimes.stops.length).to.equal(7)
|
|
20
|
-
expect(stopTimes.stops[0].stopID).to.equal('
|
|
20
|
+
expect(stopTimes.stops[0].stopID).to.equal('11197')
|
|
21
21
|
expect(stopTimes.stops[0].departureTime).to.equal('04:57')
|
|
22
22
|
|
|
23
|
-
expect(stopTimes.stops[6].stopID).to.equal('
|
|
23
|
+
expect(stopTimes.stops[6].stopID).to.equal('11207')
|
|
24
24
|
expect(stopTimes.stops[6].departureTime).to.equal('05:08')
|
|
25
25
|
|
|
26
26
|
await reader.getNextEntity()
|
|
@@ -29,7 +29,7 @@ describe('The GTFSStopTimesReader class', () => {
|
|
|
29
29
|
let lastTrip = await reader.getNextEntity()
|
|
30
30
|
expect(lastTrip.tripID).to.equal('02-ALM--12-T5-2001')
|
|
31
31
|
expect(lastTrip.stops.length).to.equal(7)
|
|
32
|
-
expect(lastTrip.stops[0].stopID).to.equal('
|
|
32
|
+
expect(lastTrip.stops[0].stopID).to.equal('11207')
|
|
33
33
|
expect(lastTrip.stops[0].departureTime).to.equal('23:31')
|
|
34
34
|
|
|
35
35
|
expect(reader.available()).to.be.false
|
|
@@ -58,6 +58,7 @@ describe('The TripLoader class', () => {
|
|
|
58
58
|
|
|
59
59
|
expect(trip.stopTimings.length).to.equal(7)
|
|
60
60
|
expect(trip.stopTimings[0].stopName).to.equal('Alamein Railway Station')
|
|
61
|
+
expect(trip.stopTimings[0].stopGTFSID).to.equal('vic:rail:ALM')
|
|
61
62
|
expect(trip.stopTimings[0].arrivalTime).to.be.null
|
|
62
63
|
expect(trip.stopTimings[0].arrivalTimeMinutes).to.be.null
|
|
63
64
|
expect(trip.stopTimings[0].stopConditions.dropoff).to.equal(1)
|
|
@@ -67,16 +68,18 @@ describe('The TripLoader class', () => {
|
|
|
67
68
|
expect(trip.stopTimings[0].platform).to.equal('1')
|
|
68
69
|
|
|
69
70
|
expect(trip.stopTimings[5].stopName).to.equal('Riversdale Railway Station')
|
|
70
|
-
expect(trip.stopTimings[5].
|
|
71
|
+
expect(trip.stopTimings[5].stopGTFSID).to.equal('vic:rail:RIV')
|
|
72
|
+
expect(trip.stopTimings[5].platform).to.equal('1')
|
|
71
73
|
|
|
72
74
|
expect(trip.stopTimings[6].stopName).to.equal('Camberwell Railway Station')
|
|
75
|
+
expect(trip.stopTimings[6].stopGTFSID).to.equal('vic:rail:CAM')
|
|
73
76
|
expect(trip.stopTimings[6].arrivalTime).to.equal('05:08')
|
|
74
77
|
expect(trip.stopTimings[6].arrivalTimeMinutes).to.equal(5 * 60 + 8)
|
|
75
78
|
expect(trip.stopTimings[6].departureTime).to.be.null
|
|
76
79
|
expect(trip.stopTimings[6].departureTimeMinutes).to.be.null
|
|
77
80
|
expect(trip.stopTimings[6].stopConditions.dropoff).to.equal(0)
|
|
78
81
|
expect(trip.stopTimings[6].stopConditions.pickup).to.equal(1)
|
|
79
|
-
expect(trip.stopTimings[6].platform).to.equal('
|
|
82
|
+
expect(trip.stopTimings[6].platform).to.equal('1')
|
|
80
83
|
|
|
81
84
|
expect(trip.origin).to.equal('Alamein Railway Station')
|
|
82
85
|
expect(trip.destination).to.equal('Camberwell Railway Station')
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_type,shape_dist_traveled
|
|
2
|
-
"02-ALM--12-T5-2000","04:57:00","04:57:00","
|
|
3
|
-
"02-ALM--12-T5-2000","04:58:00","04:58:00","
|
|
4
|
-
"02-ALM--12-T5-2000","05:00:00","05:00:00","
|
|
5
|
-
"02-ALM--12-T5-2000","05:02:00","05:02:00","
|
|
6
|
-
"02-ALM--12-T5-2000","05:04:00","05:04:00","
|
|
7
|
-
"02-ALM--12-T5-2000","05:05:00","05:05:00","
|
|
8
|
-
"02-ALM--12-T5-2000","05:08:00","05:08:00","
|
|
9
|
-
"02-ALM--12-T5-2002","07:08:00","07:08:00","
|
|
10
|
-
"02-ALM--12-T5-2002","07:09:00","07:09:00","
|
|
11
|
-
"02-ALM--12-T5-2002","07:11:00","07:11:00","
|
|
12
|
-
"02-ALM--12-T5-2002","07:13:00","07:13:00","
|
|
13
|
-
"02-ALM--12-T5-2002","07:15:00","07:15:00","
|
|
14
|
-
"02-ALM--12-T5-2002","07:16:00","07:16:00","
|
|
15
|
-
"02-ALM--12-T5-2002","07:19:00","07:19:00","
|
|
16
|
-
"02-ALM--12-T5-2004","23:16:00","23:16:00","
|
|
17
|
-
"02-ALM--12-T5-2004","23:17:00","23:17:00","
|
|
18
|
-
"02-ALM--12-T5-2004","23:19:00","23:19:00","
|
|
19
|
-
"02-ALM--12-T5-2004","23:21:00","23:21:00","
|
|
20
|
-
"02-ALM--12-T5-2004","23:23:00","23:23:00","
|
|
21
|
-
"02-ALM--12-T5-2004","23:24:00","23:24:00","
|
|
22
|
-
"02-ALM--12-T5-2004","23:27:00","23:27:00","
|
|
23
|
-
"02-ALM--12-T5-2001","23:31:00","23:31:00","
|
|
24
|
-
"02-ALM--12-T5-2001","23:33:00","23:33:00","
|
|
25
|
-
"02-ALM--12-T5-2001","23:35:00","23:35:00","
|
|
26
|
-
"02-ALM--12-T5-2001","23:37:00","23:37:00","
|
|
27
|
-
"02-ALM--12-T5-2001","23:38:00","23:38:00","
|
|
28
|
-
"02-ALM--12-T5-2001","23:40:00","23:40:00","
|
|
29
|
-
"02-ALM--12-T5-2001","23:42:00","23:42:00","
|
|
2
|
+
"02-ALM--12-T5-2000","04:57:00","04:57:00","11197","1","","0","0","0.00"
|
|
3
|
+
"02-ALM--12-T5-2000","04:58:00","04:58:00","11198","2","","0","0","716.06"
|
|
4
|
+
"02-ALM--12-T5-2000","05:00:00","05:00:00","11200","3","","0","0","1920.94"
|
|
5
|
+
"02-ALM--12-T5-2000","05:02:00","05:02:00","11202","4","","0","0","2903.58"
|
|
6
|
+
"02-ALM--12-T5-2000","05:04:00","05:04:00","11203","5","","0","0","3923.66"
|
|
7
|
+
"02-ALM--12-T5-2000","05:05:00","05:05:00","11205","6","","0","0","4428.35"
|
|
8
|
+
"02-ALM--12-T5-2000","05:08:00","05:08:00","11207","7","","0","0","5935.97"
|
|
9
|
+
"02-ALM--12-T5-2002","07:08:00","07:08:00","11197","1","","0","0","0.00"
|
|
10
|
+
"02-ALM--12-T5-2002","07:09:00","07:09:00","11198","2","","0","0","716.06"
|
|
11
|
+
"02-ALM--12-T5-2002","07:11:00","07:11:00","11200","3","","0","0","1920.94"
|
|
12
|
+
"02-ALM--12-T5-2002","07:13:00","07:13:00","11202","4","","0","0","2903.58"
|
|
13
|
+
"02-ALM--12-T5-2002","07:15:00","07:15:00","11203","5","","0","0","3923.66"
|
|
14
|
+
"02-ALM--12-T5-2002","07:16:00","07:16:00","11205","6","","0","0","4428.35"
|
|
15
|
+
"02-ALM--12-T5-2002","07:19:00","07:19:00","11208","7","","0","0","5935.62"
|
|
16
|
+
"02-ALM--12-T5-2004","23:16:00","23:16:00","11197","1","","0","0","0.00"
|
|
17
|
+
"02-ALM--12-T5-2004","23:17:00","23:17:00","11198","2","","0","0","716.06"
|
|
18
|
+
"02-ALM--12-T5-2004","23:19:00","23:19:00","11200","3","","0","0","1920.94"
|
|
19
|
+
"02-ALM--12-T5-2004","23:21:00","23:21:00","11202","4","","0","0","2903.58"
|
|
20
|
+
"02-ALM--12-T5-2004","23:23:00","23:23:00","11203","5","","0","0","3923.66"
|
|
21
|
+
"02-ALM--12-T5-2004","23:24:00","23:24:00","11205","6","","0","0","4428.35"
|
|
22
|
+
"02-ALM--12-T5-2004","23:27:00","23:27:00","11207","7","","0","0","5935.97"
|
|
23
|
+
"02-ALM--12-T5-2001","23:31:00","23:31:00","11207","1","","0","0","0.00"
|
|
24
|
+
"02-ALM--12-T5-2001","23:33:00","23:33:00","11206","2","","0","0","1491.70"
|
|
25
|
+
"02-ALM--12-T5-2001","23:35:00","23:35:00","11204","3","","0","0","2014.00"
|
|
26
|
+
"02-ALM--12-T5-2001","23:37:00","23:37:00","11201","4","","0","0","3028.33"
|
|
27
|
+
"02-ALM--12-T5-2001","23:38:00","23:38:00","11199","5","","0","0","4003.04"
|
|
28
|
+
"02-ALM--12-T5-2001","23:40:00","23:40:00","11198","6","","0","0","5220.10"
|
|
29
|
+
"02-ALM--12-T5-2001","23:42:00","23:42:00","11197","7","","0","0","5936.16"
|
|
@@ -1,8 +1,93 @@
|
|
|
1
|
-
stop_id,stop_name,stop_lat,stop_lon,platform_code
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
1
|
+
stop_id,stop_name,stop_lat,stop_lon,location_type,parent_station,wheelchair_boarding,level_id,platform_code
|
|
2
|
+
"10920","Flagstaff Station","-37.81187992","144.95604277","","vic:rail:FGS","1","Level -2","1"
|
|
3
|
+
"10921","Flagstaff Station","-37.81172541","144.95596751","","vic:rail:FGS","1","Level -2","2"
|
|
4
|
+
"10922","Melbourne Central Station","-37.80997401","144.96254713","","vic:rail:MCE","1","Level -2","1"
|
|
5
|
+
"10923","Melbourne Central Station","-37.80986533","144.96251604","","vic:rail:MCE","1","Level -2","2"
|
|
6
|
+
"10924","Parliament Station","-37.81100921","144.97292350","","vic:rail:PAR","1","Level -2","1"
|
|
7
|
+
"11197","Alamein Station","-37.86820440","145.07972689","","vic:rail:ALM","1","Level 0","1"
|
|
8
|
+
"11198","Ashburton Station","-37.86193224","145.08139014","","vic:rail:ASH","1","Level 0","1"
|
|
9
|
+
"11199","Burwood Station","-37.85162801","145.08061168","","vic:rail:BWD","1","Level 0","2"
|
|
10
|
+
"11200","Burwood Station","-37.85174400","145.08054048","","vic:rail:BWD","1","Level 0","1"
|
|
11
|
+
"11201","Hartwell Station","-37.84384815","145.07548359","","vic:rail:HWL","1","Level 0","2"
|
|
12
|
+
"11202","Hartwell Station","-37.84388325","145.07542585","","vic:rail:HWL","1","Level 0","1"
|
|
13
|
+
"11203","Willison Station","-37.83567850","145.07023035","","vic:rail:WSN","1","Level 0","1"
|
|
14
|
+
"11204","Willison Station","-37.83568036","145.07034393","","vic:rail:WSN","1","Level 0","2"
|
|
15
|
+
"11205","Riversdale Station","-37.83129769","145.06961731","","vic:rail:RIV","1","Level 0","1"
|
|
16
|
+
"11206","Riversdale Station","-37.83116499","145.06976848","","vic:rail:RIV","1","Level 0","2"
|
|
17
|
+
"11207","Camberwell Station","-37.82668783","145.05836453","","vic:rail:CAM","1","Level -2","1"
|
|
18
|
+
"11208","Camberwell Station","-37.82659756","145.05835553","","vic:rail:CAM","1","Level -2","2"
|
|
19
|
+
"11209","Camberwell Station","-37.82651798","145.05844851","","vic:rail:CAM","1","Level -2","3"
|
|
20
|
+
"11210","Parliament Station","-37.81091306","144.97309652","","vic:rail:PAR","1","Level -2","2"
|
|
21
|
+
"11212","Flinders Street Station","-37.81851165","144.96483434","","vic:rail:FSS","1","Level 0","1"
|
|
22
|
+
"11213","Flinders Street Station","-37.81830668","144.96601006","","vic:rail:FSS","1","Level 0","2"
|
|
23
|
+
"11214","Flinders Street Station","-37.81822445","144.96646672","","vic:rail:FSS","1","Level 0","3"
|
|
24
|
+
"11215","Flinders Street Station","-37.81828907","144.96655582","","vic:rail:FSS","1","Level 0","4"
|
|
25
|
+
"11216","Flinders Street Station","-37.81832588","144.96660025","","vic:rail:FSS","1","Level 0","5"
|
|
26
|
+
"11217","Flinders Street Station","-37.81837661","144.96692830","","vic:rail:FSS","1","Level 0","6"
|
|
27
|
+
"11218","Flinders Street Station","-37.81849057","144.96674342","","vic:rail:FSS","1","Level 0","7"
|
|
28
|
+
"12195","Flagstaff Station","-37.81193456","144.95607534","","vic:rail:FGS","1","Level -3","3"
|
|
29
|
+
"12196","Flagstaff Station","-37.81175303","144.95600083","","vic:rail:FGS","1","Level -3","4"
|
|
30
|
+
"12197","Melbourne Central Station","-37.81002865","144.96257971","","vic:rail:MCE","1","Level -3","3"
|
|
31
|
+
"12198","Melbourne Central Station","-37.80990097","144.96249234","","vic:rail:MCE","1","Level -3","4"
|
|
32
|
+
"12199","Parliament Station","-37.81097201","144.97285637","","vic:rail:PAR","1","Level -3","3"
|
|
33
|
+
"12200","Parliament Station","-37.81092148","144.97306221","","vic:rail:PAR","1","Level -3","4"
|
|
34
|
+
"12201","Flinders Street Station","-37.81845378","144.96826668","","vic:rail:FSS","1","Level 0","13"
|
|
35
|
+
"12202","Flinders Street Station","-37.81840717","144.96817708","","vic:rail:FSS","1","Level 0","12"
|
|
36
|
+
"12203","Flinders Street Station","-37.81891371","144.96619788","","vic:rail:FSS","1","Level 0","10"
|
|
37
|
+
"12204","Flinders Street Station","-37.81860101","144.96687671","","vic:rail:FSS","1","Level 0","9"
|
|
38
|
+
"12205","Flinders Street Station","-37.81855617","144.96688930","","vic:rail:FSS","1","Level 0","8"
|
|
39
|
+
"12238","Auburn Station","-37.82255502","145.04605538","","vic:rail:AUB","1","Level 0","1"
|
|
40
|
+
"12239","Auburn Station","-37.82249272","145.04610247","","vic:rail:AUB","1","Level 0","2"
|
|
41
|
+
"12240","Auburn Station","-37.82237411","145.04601471","","vic:rail:AUB","1","Level 0","3"
|
|
42
|
+
"12241","Glenferrie Station","-37.82159483","145.03654905","","vic:rail:GFE","1","Level 0","1"
|
|
43
|
+
"12242","Glenferrie Station","-37.82153196","145.03656207","","vic:rail:GFE","1","Level 0","2"
|
|
44
|
+
"12243","Glenferrie Station","-37.82142406","145.03657629","","vic:rail:GFE","1","Level 0","3"
|
|
45
|
+
"12244","Hawthorn Station","-37.82207113","145.02300573","","vic:rail:HAW","1","Level 0","1"
|
|
46
|
+
"12245","Hawthorn Station","-37.82196208","145.02295183","","vic:rail:HAW","1","Level 0","2"
|
|
47
|
+
"12246","Hawthorn Station","-37.82189883","145.02294216","","vic:rail:HAW","1","Level 0","3"
|
|
48
|
+
"12247","Burnley Station","-37.82768805","145.00765396","","vic:rail:BLY","1","Level 0","1"
|
|
49
|
+
"12248","Burnley Station","-37.82761657","145.00768997","","vic:rail:BLY","1","Level 0","2"
|
|
50
|
+
"12249","Burnley Station","-37.82752649","145.00769239","","vic:rail:BLY","1","Level 0","3"
|
|
51
|
+
"12250","Burnley Station","-37.82748126","145.00768225","","vic:rail:BLY","1","Level 0","4"
|
|
52
|
+
"12251","East Richmond Station","-37.82651183","144.99675591","","vic:rail:ERM","1","Level 0","1"
|
|
53
|
+
"12252","East Richmond Station","-37.82633303","144.99684028","","vic:rail:ERM","1","Level 0","2"
|
|
54
|
+
"12253","Richmond Station","-37.82406640","144.98916470","","vic:rail:RMD","1","Level 0","1"
|
|
55
|
+
"12254","Richmond Station","-37.82403938","144.98916544","","vic:rail:RMD","1","Level 0","2"
|
|
56
|
+
"12255","Richmond Station","-37.82395008","144.98921331","","vic:rail:RMD","1","Level 0","3"
|
|
57
|
+
"12256","Richmond Station","-37.82392305","144.98921404","","vic:rail:RMD","1","Level 0","4"
|
|
58
|
+
"12257","Richmond Station","-37.82383356","144.98925055","","vic:rail:RMD","1","Level 0","5"
|
|
59
|
+
"12258","Richmond Station","-37.82380712","144.98928535","","vic:rail:RMD","1","Level 0","6"
|
|
60
|
+
"12259","Richmond Station","-37.82371743","144.98931051","","vic:rail:RMD","1","Level 0","7"
|
|
61
|
+
"12260","Richmond Station","-37.82369060","144.98932260","","vic:rail:RMD","1","Level 0","8"
|
|
62
|
+
"12261","Richmond Station","-37.82360091","144.98934775","","vic:rail:RMD","1","Level 0","9"
|
|
63
|
+
"12262","Richmond Station","-37.82358348","144.98938231","","vic:rail:RMD","1","Level 0","10"
|
|
64
|
+
"22187","Southern Cross Station","-37.81765471","144.95179389","","vic:rail:SSS","1","Level 0","8"
|
|
65
|
+
"22188","Southern Cross Station","-37.81825315","144.95200455","","vic:rail:SSS","1","Level 0","9"
|
|
66
|
+
"22189","Southern Cross Station","-37.81853495","144.95214444","","vic:rail:SSS","1","Level 0","10"
|
|
67
|
+
"22190","Southern Cross Station","-37.81853100","144.95191735","","vic:rail:SSS","1","Level 0","11"
|
|
68
|
+
"22191","Southern Cross Station","-37.81854783","144.95184872","","vic:rail:SSS","1","Level 0","12"
|
|
69
|
+
"22192","Southern Cross Station","-37.81866354","144.95176600","","vic:rail:SSS","1","Level 0","13"
|
|
70
|
+
"22193","Southern Cross Station","-37.81868957","144.95170848","","vic:rail:SSS","1","Level 0","14"
|
|
71
|
+
"26128","Burnley Rail Replacement Bus Stop","-37.82832757","145.00710276","","vic:rail:BLY","1","Level 0","Replacement bus"
|
|
72
|
+
"26170","Flinders Street Rail Replacement Bus Stop","-37.81798064","144.96591676","","vic:rail:FSS","1","Level 0","Replacement bus"
|
|
73
|
+
"26263","Richmond Rail Replacement Bus Stop","-37.82486644","144.98957471","","vic:rail:RMD","1","Level 0","Replacement bus"
|
|
74
|
+
"26282","Southern Cross Rail Replacement Bus Stop","-37.81743698","144.95326534","","vic:rail:SSS","1","Level 0","Replacement bus"
|
|
75
|
+
"vic:rail:ALM","Alamein Railway Station","-37.86832039","145.07965567","1","","1","",""
|
|
76
|
+
"vic:rail:ASH","Ashburton Railway Station","-37.86196753","145.08134376","1","","1","",""
|
|
77
|
+
"vic:rail:AUB","Auburn Railway Station","-37.82239831","145.04584366","1","","1","",""
|
|
78
|
+
"vic:rail:BLY","Burnley Railway Station","-37.82756022","145.00755515","1","","1","",""
|
|
79
|
+
"vic:rail:BWD","Burwood Railway Station","-37.85156328","145.08051107","1","","1","",""
|
|
80
|
+
"vic:rail:CAM","Camberwell Railway Station","-37.82656714","145.05869718","1","","1","",""
|
|
81
|
+
"vic:rail:ERM","East Richmond Railway Station","-37.82639995","144.99706569","1","","1","",""
|
|
82
|
+
"vic:rail:FGS","Flagstaff Railway Station","-37.81198150","144.95566511","1","","1","",""
|
|
83
|
+
"vic:rail:FSS","Flinders Street Railway Station","-37.81830513","144.96696435","1","","1","",""
|
|
84
|
+
"vic:rail:GFE","Glenferrie Railway Station","-37.82146682","145.03643883","1","","1","",""
|
|
85
|
+
"vic:rail:HAW","Hawthorn Railway Station","-37.82182601","145.02289866","1","","1","",""
|
|
86
|
+
"vic:rail:HWL","Hartwell Railway Station","-37.84398457","145.07555959","1","","1","",""
|
|
87
|
+
"vic:rail:JOR","Jordanville Railway Station","-37.87360339","145.11209016","1","","1","",""
|
|
88
|
+
"vic:rail:MCE","Melbourne Central Railway Station","-37.80993896","144.96260489","1","","1","",""
|
|
89
|
+
"vic:rail:PAR","Parliament Railway Station","-37.81133700","144.97311900","1","","1","",""
|
|
90
|
+
"vic:rail:RIV","Riversdale Railway Station","-37.83150543","145.06964598","1","","1","",""
|
|
91
|
+
"vic:rail:RMD","Richmond Railway Station","-37.82407446","144.99016426","1","","1","",""
|
|
92
|
+
"vic:rail:SSS","Southern Cross Railway Station","-37.81866310","144.95277706","1","","1","",""
|
|
93
|
+
"vic:rail:WSN","Willison Railway Station","-37.83571565","145.07029756","1","","1","",""
|
|
@@ -22,8 +22,8 @@ const stopsFile = path.join(__dirname, 'sample-data', 'trips', 'stops.txt')
|
|
|
22
22
|
const stopTimesFile = path.join(__dirname, 'sample-data', 'trips', 'stop_times.txt')
|
|
23
23
|
const tripsFile = path.join(__dirname, 'sample-data', 'trips', 'trips.txt')
|
|
24
24
|
|
|
25
|
-
describe('The
|
|
26
|
-
it('Should
|
|
25
|
+
describe('The set stop services function', () => {
|
|
26
|
+
it('Should set stop and screen services on each bay', async () => {
|
|
27
27
|
let database = new LokiDatabaseConnection('test-db')
|
|
28
28
|
let stops = await database.createCollection('stops')
|
|
29
29
|
let routes = await database.createCollection('routes')
|
|
@@ -47,8 +47,8 @@ describe('The TripLoader class', () => {
|
|
|
47
47
|
|
|
48
48
|
await setStopServices(database)
|
|
49
49
|
|
|
50
|
-
let alamein = await stops.findDocument({ 'bays.stopGTFSID': '
|
|
51
|
-
let alameinPlatform = alamein.bays.find(bay => bay.stopGTFSID === '
|
|
50
|
+
let alamein = await stops.findDocument({ 'bays.stopGTFSID': 'vic:rail:ALM' })
|
|
51
|
+
let alameinPlatform = alamein.bays.find(bay => bay.stopGTFSID === 'vic:rail:ALM')
|
|
52
52
|
expect(alameinPlatform).to.not.be.null
|
|
53
53
|
expect(alameinPlatform.services).to.deep.equal([{
|
|
54
54
|
routeGTFSID: "2-ALM",
|