fleetmap-reports 1.0.496 → 1.0.498
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/package.json +2 -2
- package/src/index.test.js +1 -1
- package/src/speeding-report.js +0 -1
package/package.json
CHANGED
package/src/index.test.js
CHANGED
|
@@ -22,7 +22,7 @@ describe('Test_Reports', function () {
|
|
|
22
22
|
userData.roadSpeedLimits = true
|
|
23
23
|
const { device, totalDistance, totalEventTime } = await getSpeedingReport(report, userData)
|
|
24
24
|
assert.equal(device.alerts.length, 104) // Total Alerts
|
|
25
|
-
assert.equal(totalDistance, 36.
|
|
25
|
+
assert.equal(totalDistance, 36.63687856826021) // Total Kms
|
|
26
26
|
assert.equal(totalEventTime, 1524000) // Total Duration
|
|
27
27
|
}, 200000)
|
|
28
28
|
// eslint-disable-next-line no-undef
|
package/src/speeding-report.js
CHANGED
|
@@ -315,7 +315,6 @@ async function getHereEvents (devices, routes, threshold) {
|
|
|
315
315
|
timestamps[new Date(p.fixTime).getTime()] = p
|
|
316
316
|
}
|
|
317
317
|
const reduced = results.reduce((acc, cur, idx, src) => {
|
|
318
|
-
console.log('idx', idx)
|
|
319
318
|
cur.overSpeeding = cur.currentSpeedKmh > parseInt(cur.speedLimit) + (threshold || 0)
|
|
320
319
|
const last = acc.length && acc.slice(-1)[0]
|
|
321
320
|
cur.position = timestamps[cur.timestamp]
|