@sports-alliance/sports-lib 7.0.0 → 7.0.3
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/.github/workflows/test.yml +2 -2
- package/lib/cjs/activities/activity.types.d.ts +6 -3
- package/lib/cjs/activities/activity.types.js +9 -4
- package/lib/cjs/activities/devices/device.d.ts +1 -0
- package/lib/cjs/activities/devices/device.interface.d.ts +1 -0
- package/lib/cjs/activities/devices/device.js +1 -0
- package/lib/cjs/activities/devices/device.json.interface.d.ts +1 -0
- package/lib/cjs/data/data.cycling-position.js +1 -1
- package/lib/cjs/data/data.feeling.js +1 -1
- package/lib/cjs/data/data.interface.js +1 -1
- package/lib/cjs/data/data.rpe.js +1 -1
- package/lib/cjs/data/data.store.export.spec.js +28 -14
- package/lib/cjs/data/data.store.js +1 -1
- package/lib/cjs/events/adapters/file-type.enum.js +1 -1
- package/lib/cjs/events/adapters/importers/fit/importer.fit.coros.device.names.js +2 -1
- package/lib/cjs/events/adapters/importers/fit/importer.fit.d.ts +2 -1
- package/lib/cjs/events/adapters/importers/fit/importer.fit.garmin.device.names.js +61 -2
- package/lib/cjs/events/adapters/importers/fit/importer.fit.garmin.profile.data.js +867 -855
- package/lib/cjs/events/adapters/importers/fit/importer.fit.garmin.profile.mapper.spec.d.ts +1 -0
- package/lib/cjs/events/adapters/importers/fit/importer.fit.garmin.profile.mapper.spec.js +34 -0
- package/lib/cjs/events/adapters/importers/fit/importer.fit.integration.spec.js +22 -8
- package/lib/cjs/events/adapters/importers/fit/importer.fit.js +24 -2
- package/lib/cjs/events/adapters/importers/fit/importer.fit.suunto.device.names.js +1 -0
- package/lib/cjs/events/adapters/importers/fit/importer.fit.wahoo.device.names.js +5 -1
- package/lib/cjs/events/adapters/importers/gpx/importer.gpx.integration.spec.js +22 -8
- package/lib/cjs/events/adapters/importers/gpx/importer.gpx.js +1 -1
- package/lib/cjs/events/adapters/importers/gpx/importer.gpx.spec.js +50 -0
- package/lib/cjs/events/adapters/importers/suunto/importer.suunto.activity.ids.js +1 -1
- package/lib/cjs/events/adapters/importers/suunto/importer.suunto.device.names.js +1 -0
- package/lib/cjs/events/adapters/importers/suunto/importer.suunto.integration.spec.js +22 -8
- package/lib/cjs/events/adapters/importers/tcx/importer.tcx.integration.spec.js +22 -8
- package/lib/cjs/events/utilities/activity.utilities.js +7 -7
- package/lib/cjs/events/utilities/grade-calculator/low-pass-filter.js +3 -3
- package/lib/cjs/events/utilities/helpers.d.ts +1 -1
- package/lib/cjs/events/utilities/helpers.js +19 -19
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/index.js +5 -1
- package/lib/cjs/laps/lap.types.js +1 -1
- package/lib/cjs/meta-data/event-meta-data.interface.js +1 -1
- package/lib/cjs/privacy/privacy.class.interface.js +1 -1
- package/lib/cjs/specs/activities-parsing.integration.spec.js +75 -61
- package/lib/cjs/specs/strava-streams-compliance.spec.js +22 -8
- package/lib/cjs/streams/compressed.stream.interface.js +2 -2
- package/lib/cjs/tiles/tile.settings.interface.js +5 -5
- package/lib/cjs/users/settings/dashboard/user.dashboard.settings.interface.js +1 -1
- package/lib/cjs/users/settings/user.app.settings.interface.js +1 -1
- package/lib/cjs/users/settings/user.chart.settings.interface.js +3 -3
- package/lib/cjs/users/settings/user.map.settings.interface.js +2 -2
- package/lib/cjs/users/settings/user.unit.settings.interface.js +9 -9
- package/lib/esm/activities/activity.types.d.ts +6 -3
- package/lib/esm/activities/activity.types.js +7 -2
- package/lib/esm/activities/devices/device.d.ts +1 -0
- package/lib/esm/activities/devices/device.interface.d.ts +1 -0
- package/lib/esm/activities/devices/device.js +1 -0
- package/lib/esm/activities/devices/device.json.interface.d.ts +1 -0
- package/lib/esm/data/data.store.export.spec.js +6 -6
- package/lib/esm/data/data.store.js +1 -1
- package/lib/esm/events/adapters/importers/fit/importer.fit.coros.device.names.js +2 -1
- package/lib/esm/events/adapters/importers/fit/importer.fit.d.ts +2 -1
- package/lib/esm/events/adapters/importers/fit/importer.fit.garmin.device.names.js +61 -2
- package/lib/esm/events/adapters/importers/fit/importer.fit.garmin.profile.data.js +867 -855
- package/lib/esm/events/adapters/importers/fit/importer.fit.garmin.profile.mapper.spec.d.ts +1 -0
- package/lib/esm/events/adapters/importers/fit/importer.fit.garmin.profile.mapper.spec.js +32 -0
- package/lib/esm/events/adapters/importers/fit/importer.fit.js +24 -2
- package/lib/esm/events/adapters/importers/fit/importer.fit.suunto.device.names.js +1 -0
- package/lib/esm/events/adapters/importers/fit/importer.fit.wahoo.device.names.js +5 -1
- package/lib/esm/events/adapters/importers/gpx/importer.gpx.js +1 -1
- package/lib/esm/events/adapters/importers/gpx/importer.gpx.spec.js +17 -0
- package/lib/esm/events/adapters/importers/suunto/importer.suunto.device.names.js +1 -0
- package/lib/esm/events/utilities/activity.utilities.js +7 -7
- package/lib/esm/events/utilities/grade-calculator/low-pass-filter.js +3 -3
- package/lib/esm/events/utilities/helpers.d.ts +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/specs/activities-parsing.integration.spec.js +53 -53
- package/package.json +21 -21
- package/.editorconfig +0 -14
- package/.eslintignore +0 -4
- package/.eslintrc.js +0 -9
- package/.prettierignore +0 -24
- package/.prettierrc.json +0 -12
- package/.vscode/launch.json +0 -49
- package/.vscode/tasks.json +0 -34
- package/CODE_OF_CONDUCT.md +0 -76
- package/debug-fit-import.js +0 -10
- package/jest.config.js +0 -23
- package/lib/cjs/package.json +0 -1
- package/lib/cjs/specs/fixtures/streams/strava/rides/3171472783.json +0 -52534
- package/lib/cjs/specs/fixtures/streams/strava/rides/3171487458.json +0 -78818
- package/lib/cjs/specs/fixtures/streams/strava/rides/343080886.json +0 -105090
- package/lib/cjs/specs/fixtures/streams/strava/rides/5910143591.json +0 -110711
- package/lib/cjs/specs/fixtures/streams/strava/runs/2451375851.json +0 -74846
- package/lib/cjs/specs/fixtures/streams/strava/runs/2709634581.json +0 -66817
- package/lib/cjs/specs/fixtures/streams/strava/runs/3156040843.json +0 -17594
- package/lib/cjs/specs/fixtures/streams/strava/runs/3182900697.json +0 -17322
- package/lib/cjs/specs/fixtures/streams/strava/runs/3183465494.json +0 -20463
- package/lib/cjs/specs/fixtures/streams/strava/runs/3183490558.json +0 -58202
- package/lib/esm/specs/fixtures/streams/strava/rides/3171472783.json +0 -52534
- package/lib/esm/specs/fixtures/streams/strava/rides/3171487458.json +0 -78818
- package/lib/esm/specs/fixtures/streams/strava/rides/343080886.json +0 -105090
- package/lib/esm/specs/fixtures/streams/strava/rides/5910143591.json +0 -110711
- package/lib/esm/specs/fixtures/streams/strava/runs/2451375851.json +0 -74846
- package/lib/esm/specs/fixtures/streams/strava/runs/2709634581.json +0 -66817
- package/lib/esm/specs/fixtures/streams/strava/runs/3156040843.json +0 -17594
- package/lib/esm/specs/fixtures/streams/strava/runs/3182900697.json +0 -17322
- package/lib/esm/specs/fixtures/streams/strava/runs/3183465494.json +0 -20463
- package/lib/esm/specs/fixtures/streams/strava/runs/3183490558.json +0 -58202
- package/test_output.log +0 -162
- package/test_output_2.log +0 -168
- package/test_output_3.log +0 -168
- package/tsconfig.cjs.json +0 -7
- package/tsconfig.esm.json +0 -8
- package/tsconfig.lib.json +0 -8
package/test_output.log
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
ts-jest[ts-jest-transformer] (WARN) Define `ts-jest` config under `globals` is deprecated. Please do
|
|
2
|
-
transform: {
|
|
3
|
-
<transform_regex>: ['ts-jest', { /* ts-jest config goes here in Jest */ }],
|
|
4
|
-
},
|
|
5
|
-
See more at https://kulshekhar.github.io/ts-jest/docs/getting-started/presets#advanced
|
|
6
|
-
console.log
|
|
7
|
-
Jest Setup: Enabled ActivityParsingOptions.generateUnitStreams.
|
|
8
|
-
|
|
9
|
-
at Object.log (jest.setup.ts:8:9)
|
|
10
|
-
|
|
11
|
-
[DEBUG-FORCE] fit-parser.js LOADING via process.stdout
|
|
12
|
-
console.error
|
|
13
|
-
[DEBUG-FORCE] fit-parser.js LOADING via console.error
|
|
14
|
-
|
|
15
|
-
111 | // eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
16
|
-
112 | // @ts-ignore
|
|
17
|
-
> 113 | import FitFileParser from 'fit-file-parser';
|
|
18
|
-
| ^
|
|
19
|
-
114 | try {
|
|
20
|
-
115 | console.log('[DEBUG-JEST-RESOLVE] fit-file-parser resolves to:', require.resolve('fit-file-parser'));
|
|
21
|
-
116 | } catch (e) {
|
|
22
|
-
|
|
23
|
-
at Object.error (node_modules/fit-file-parser/dist/cjs/fit-parser.js:6:9)
|
|
24
|
-
at Object.require (src/events/adapters/importers/fit/importer.fit.ts:113:1)
|
|
25
|
-
at Object.require (src/index.ts:4:1)
|
|
26
|
-
at Object.require (src/specs/activities-parsing.integration.spec.ts:2:1)
|
|
27
|
-
|
|
28
|
-
console.log
|
|
29
|
-
[DEBUG-JEST-RESOLVE] fit-file-parser resolves to: /Users/dimitrios/Projects/sports-lib/node_modules/fit-file-parser/dist/cjs/fit-parser.js
|
|
30
|
-
|
|
31
|
-
at Object.log (src/events/adapters/importers/fit/importer.fit.ts:115:11)
|
|
32
|
-
|
|
33
|
-
console.log
|
|
34
|
-
[DEBUG] Start parsing FIT file (1)
|
|
35
|
-
|
|
36
|
-
at Object.log (src/specs/activities-parsing.integration.spec.ts:119:17)
|
|
37
|
-
|
|
38
|
-
console.log
|
|
39
|
-
[DEBUG-FIT-PARSER] CJS helper.js LOADED - Patched Version
|
|
40
|
-
|
|
41
|
-
at log (node_modules/fit-file-parser/dist/cjs/helper.js:8:13)
|
|
42
|
-
|
|
43
|
-
console.log
|
|
44
|
-
[DEBUG-FIT-PARSER] CJS helper.js LOADED - Patched Version
|
|
45
|
-
|
|
46
|
-
at log (node_modules/fit-file-parser/dist/cjs/helper.js:8:13)
|
|
47
|
-
|
|
48
|
-
console.log
|
|
49
|
-
[DEBUG] Promise resolved
|
|
50
|
-
|
|
51
|
-
at log (src/specs/activities-parsing.integration.spec.ts:126:19)
|
|
52
|
-
|
|
53
|
-
console.error
|
|
54
|
-
[DEBUG] Expectation failed Error: Actual time of "57:53" (or 3473s) IS HIGHER THAN "44:06". Max possible value: "44:19" (or 2659.23s); Delta seconds: 13.23
|
|
55
|
-
at Function.assertNearEqualTime (/Users/dimitrios/Projects/sports-lib/src/specs/spec-utils.ts:161:15)
|
|
56
|
-
at assertNearEqualTime (/Users/dimitrios/Projects/sports-lib/src/specs/activities-parsing.integration.spec.ts:165:23)
|
|
57
|
-
|
|
58
|
-
171 | done();
|
|
59
|
-
172 | } catch (e) {
|
|
60
|
-
> 173 | console.error('[DEBUG] Expectation failed', e);
|
|
61
|
-
| ^
|
|
62
|
-
174 | done(e);
|
|
63
|
-
175 | }
|
|
64
|
-
176 | }).catch((e) => {
|
|
65
|
-
|
|
66
|
-
at error (src/specs/activities-parsing.integration.spec.ts:173:21)
|
|
67
|
-
|
|
68
|
-
FAIL src/specs/activities-parsing.integration.spec.ts
|
|
69
|
-
FIT/TCX/GPX activity parsing compliance
|
|
70
|
-
Swimming
|
|
71
|
-
FIT
|
|
72
|
-
✕ should parse swimming pool FIT file (1) (144 ms)
|
|
73
|
-
○ skipped should parse swimming pool FIT file (2)
|
|
74
|
-
○ skipped should parse swimming pool FIT file (3)
|
|
75
|
-
○ skipped should parse swimming pool FIT file (4)
|
|
76
|
-
○ skipped should parse swimming open water FIT file (1)
|
|
77
|
-
TCX
|
|
78
|
-
○ skipped should parse swimming pool TCX file (1)
|
|
79
|
-
○ skipped should parse swimming pool TCX file (2)
|
|
80
|
-
GPX
|
|
81
|
-
○ skipped should parse swimming open water GPX file (1)
|
|
82
|
-
○ skipped should parse swimming open water GPX file (2)
|
|
83
|
-
Running
|
|
84
|
-
FIT
|
|
85
|
-
○ skipped should parse running FIT file (1)
|
|
86
|
-
○ skipped should parse running FIT file (2)
|
|
87
|
-
○ skipped should parse running FIT file (Suunto export) (3)
|
|
88
|
-
○ skipped should parse running FIT file (Suunto export) (4)
|
|
89
|
-
○ skipped should parse running FIT file (Suunto export) (5)
|
|
90
|
-
○ skipped should parse running FIT file (Suunto export) (6)
|
|
91
|
-
○ skipped should parse running FIT file (Coros export) (7)
|
|
92
|
-
○ skipped should parse running FIT file (Coros export) (8)
|
|
93
|
-
○ skipped should parse running treadmill FIT file (1)
|
|
94
|
-
TCX
|
|
95
|
-
○ skipped should parse running TCX file (1)
|
|
96
|
-
○ skipped should parse running TCX file (2)
|
|
97
|
-
○ skipped should parse running TCX file (3)
|
|
98
|
-
○ skipped should parse running TCX file (4)
|
|
99
|
-
○ skipped should parse running treadmill TCX file (3)
|
|
100
|
-
GPX
|
|
101
|
-
○ skipped should parse running GPX file (1)
|
|
102
|
-
○ skipped should parse running GPX file (2)
|
|
103
|
-
○ skipped should parse running GPX file (3)
|
|
104
|
-
○ skipped should parse running GPX file (4)
|
|
105
|
-
○ skipped should parse running GPX file (5)
|
|
106
|
-
○ skipped should parse running GPX file (6)
|
|
107
|
-
Cycling
|
|
108
|
-
FIT
|
|
109
|
-
○ skipped should parse cycling FIT file (1)
|
|
110
|
-
○ skipped should parse cycling FIT file (2)
|
|
111
|
-
○ skipped should parse cycling FIT file (3)
|
|
112
|
-
○ skipped should parse cycling FIT file (4)
|
|
113
|
-
○ skipped should parse cycling FIT file (5)
|
|
114
|
-
○ skipped should parse cycling FIT file (6)
|
|
115
|
-
○ skipped should parse cycling FIT file (7)
|
|
116
|
-
○ skipped should parse cycling FIT file (8)
|
|
117
|
-
○ skipped should parse cycling FIT file (9)
|
|
118
|
-
○ skipped should parse virtual cycling FIT file (1)
|
|
119
|
-
TCX
|
|
120
|
-
○ skipped should parse cycling TCX file (1)
|
|
121
|
-
○ skipped should parse cycling TCX file (2)
|
|
122
|
-
○ skipped should parse cycling TCX file (3)
|
|
123
|
-
○ skipped should parse virtual cycling TCX file (1)
|
|
124
|
-
GPX
|
|
125
|
-
○ skipped should parse cycling GPX file (1)
|
|
126
|
-
○ skipped should parse cycling GPX file (2)
|
|
127
|
-
○ skipped should parse cycling GPX file (3)
|
|
128
|
-
○ skipped should parse cycling GPX file (4)
|
|
129
|
-
○ skipped should parse virtual cycling GPX file (1)
|
|
130
|
-
Triathlon
|
|
131
|
-
FIT
|
|
132
|
-
○ skipped should parse a .FIT Triathlon IronMan w/ 3 activities (swim + ride + run)
|
|
133
|
-
Others
|
|
134
|
-
○ skipped should reject parsing of broken fit file (empty activities)
|
|
135
|
-
○ skipped should reject parsing of broken fit file (empty sessions)
|
|
136
|
-
○ skipped should parse fit file with broken sessionObject.start_time date
|
|
137
|
-
○ skipped should handle activity with broken start lat/lng
|
|
138
|
-
○ skipped should reject parsing of a too long activity (31 days)
|
|
139
|
-
○ skipped should handle inverted elapsed and timer time
|
|
140
|
-
○ skipped should handle calculation on a ultra long activity (27 days) with acceptable human time
|
|
141
|
-
○ skipped should handle and detect an activity with broken speed data
|
|
142
|
-
|
|
143
|
-
● FIT/TCX/GPX activity parsing compliance › Swimming › FIT › should parse swimming pool FIT file (1)
|
|
144
|
-
|
|
145
|
-
Actual time of "57:53" (or 3473s) IS HIGHER THAN "44:06". Max possible value: "44:19" (or 2659.23s); Delta seconds: 13.23
|
|
146
|
-
|
|
147
|
-
159 |
|
|
148
|
-
160 | if (SpecUtils.THROW_ON_ERROR) {
|
|
149
|
-
> 161 | throw new Error(message);
|
|
150
|
-
| ^
|
|
151
|
-
162 | } else {
|
|
152
|
-
163 | console.error(message);
|
|
153
|
-
164 | }
|
|
154
|
-
|
|
155
|
-
at Function.assertNearEqualTime (src/specs/spec-utils.ts:161:15)
|
|
156
|
-
at assertNearEqualTime (src/specs/activities-parsing.integration.spec.ts:165:23)
|
|
157
|
-
|
|
158
|
-
Test Suites: 1 failed, 1 total
|
|
159
|
-
Tests: 1 failed, 56 skipped, 57 total
|
|
160
|
-
Snapshots: 0 total
|
|
161
|
-
Time: 2.155 s, estimated 6 s
|
|
162
|
-
Ran all test suites matching src/specs/activities-parsing.integration.spec.ts.
|
package/test_output_2.log
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
ts-jest[ts-jest-transformer] (WARN) Define `ts-jest` config under `globals` is deprecated. Please do
|
|
2
|
-
transform: {
|
|
3
|
-
<transform_regex>: ['ts-jest', { /* ts-jest config goes here in Jest */ }],
|
|
4
|
-
},
|
|
5
|
-
See more at https://kulshekhar.github.io/ts-jest/docs/getting-started/presets#advanced
|
|
6
|
-
console.log
|
|
7
|
-
Jest Setup: Enabled ActivityParsingOptions.generateUnitStreams.
|
|
8
|
-
|
|
9
|
-
at Object.log (jest.setup.ts:8:9)
|
|
10
|
-
|
|
11
|
-
[DEBUG-FORCE] fit-parser.js LOADING via process.stdout
|
|
12
|
-
console.error
|
|
13
|
-
[DEBUG-FORCE] fit-parser.js LOADING via console.error
|
|
14
|
-
|
|
15
|
-
111 | // eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
16
|
-
112 | // @ts-ignore
|
|
17
|
-
> 113 | import FitFileParser from 'fit-file-parser';
|
|
18
|
-
| ^
|
|
19
|
-
114 | try {
|
|
20
|
-
115 | console.log('[DEBUG-JEST-RESOLVE] fit-file-parser resolves to:', require.resolve('fit-file-parser'));
|
|
21
|
-
116 | } catch (e) {
|
|
22
|
-
|
|
23
|
-
at Object.error (node_modules/fit-file-parser/dist/cjs/fit-parser.js:6:9)
|
|
24
|
-
at Object.require (src/events/adapters/importers/fit/importer.fit.ts:113:1)
|
|
25
|
-
at Object.require (src/index.ts:4:1)
|
|
26
|
-
at Object.require (src/specs/activities-parsing.integration.spec.ts:2:1)
|
|
27
|
-
|
|
28
|
-
console.log
|
|
29
|
-
[DEBUG-JEST-RESOLVE] fit-file-parser resolves to: /Users/dimitrios/Projects/sports-lib/node_modules/fit-file-parser/dist/cjs/fit-parser.js
|
|
30
|
-
|
|
31
|
-
at Object.log (src/events/adapters/importers/fit/importer.fit.ts:115:11)
|
|
32
|
-
|
|
33
|
-
console.log
|
|
34
|
-
[DEBUG] Start parsing FIT file (1)
|
|
35
|
-
|
|
36
|
-
at Object.log (src/specs/activities-parsing.integration.spec.ts:119:17)
|
|
37
|
-
|
|
38
|
-
console.log
|
|
39
|
-
[DEBUG-FIT-PARSER] CJS helper.js LOADED - Patched Version
|
|
40
|
-
|
|
41
|
-
at log (node_modules/fit-file-parser/dist/cjs/helper.js:8:13)
|
|
42
|
-
|
|
43
|
-
console.log
|
|
44
|
-
[DEBUG-FIT-PARSER] CJS helper.js LOADED - Patched Version
|
|
45
|
-
|
|
46
|
-
at log (node_modules/fit-file-parser/dist/cjs/helper.js:8:13)
|
|
47
|
-
|
|
48
|
-
console.log
|
|
49
|
-
[DEBUG-IMPORTER] Found top-level lengths: 64
|
|
50
|
-
|
|
51
|
-
at log (src/events/adapters/importers/fit/importer.fit.ts:333:19)
|
|
52
|
-
|
|
53
|
-
console.log
|
|
54
|
-
[DEBUG] Promise resolved
|
|
55
|
-
|
|
56
|
-
at log (src/specs/activities-parsing.integration.spec.ts:126:19)
|
|
57
|
-
|
|
58
|
-
console.error
|
|
59
|
-
[DEBUG] Expectation failed Error: Actual time of "57:53" (or 3473s) IS HIGHER THAN "44:06". Max possible value: "44:19" (or 2659.23s); Delta seconds: 13.23
|
|
60
|
-
at Function.assertNearEqualTime (/Users/dimitrios/Projects/sports-lib/src/specs/spec-utils.ts:161:15)
|
|
61
|
-
at assertNearEqualTime (/Users/dimitrios/Projects/sports-lib/src/specs/activities-parsing.integration.spec.ts:165:23)
|
|
62
|
-
at processTicksAndRejections (node:internal/process/task_queues:95:5)
|
|
63
|
-
|
|
64
|
-
171 | done();
|
|
65
|
-
172 | } catch (e) {
|
|
66
|
-
> 173 | console.error('[DEBUG] Expectation failed', e);
|
|
67
|
-
| ^
|
|
68
|
-
174 | done(e);
|
|
69
|
-
175 | }
|
|
70
|
-
176 | }).catch((e) => {
|
|
71
|
-
|
|
72
|
-
at error (src/specs/activities-parsing.integration.spec.ts:173:21)
|
|
73
|
-
|
|
74
|
-
FAIL src/specs/activities-parsing.integration.spec.ts
|
|
75
|
-
FIT/TCX/GPX activity parsing compliance
|
|
76
|
-
Swimming
|
|
77
|
-
FIT
|
|
78
|
-
✕ should parse swimming pool FIT file (1) (140 ms)
|
|
79
|
-
○ skipped should parse swimming pool FIT file (2)
|
|
80
|
-
○ skipped should parse swimming pool FIT file (3)
|
|
81
|
-
○ skipped should parse swimming pool FIT file (4)
|
|
82
|
-
○ skipped should parse swimming open water FIT file (1)
|
|
83
|
-
TCX
|
|
84
|
-
○ skipped should parse swimming pool TCX file (1)
|
|
85
|
-
○ skipped should parse swimming pool TCX file (2)
|
|
86
|
-
GPX
|
|
87
|
-
○ skipped should parse swimming open water GPX file (1)
|
|
88
|
-
○ skipped should parse swimming open water GPX file (2)
|
|
89
|
-
Running
|
|
90
|
-
FIT
|
|
91
|
-
○ skipped should parse running FIT file (1)
|
|
92
|
-
○ skipped should parse running FIT file (2)
|
|
93
|
-
○ skipped should parse running FIT file (Suunto export) (3)
|
|
94
|
-
○ skipped should parse running FIT file (Suunto export) (4)
|
|
95
|
-
○ skipped should parse running FIT file (Suunto export) (5)
|
|
96
|
-
○ skipped should parse running FIT file (Suunto export) (6)
|
|
97
|
-
○ skipped should parse running FIT file (Coros export) (7)
|
|
98
|
-
○ skipped should parse running FIT file (Coros export) (8)
|
|
99
|
-
○ skipped should parse running treadmill FIT file (1)
|
|
100
|
-
TCX
|
|
101
|
-
○ skipped should parse running TCX file (1)
|
|
102
|
-
○ skipped should parse running TCX file (2)
|
|
103
|
-
○ skipped should parse running TCX file (3)
|
|
104
|
-
○ skipped should parse running TCX file (4)
|
|
105
|
-
○ skipped should parse running treadmill TCX file (3)
|
|
106
|
-
GPX
|
|
107
|
-
○ skipped should parse running GPX file (1)
|
|
108
|
-
○ skipped should parse running GPX file (2)
|
|
109
|
-
○ skipped should parse running GPX file (3)
|
|
110
|
-
○ skipped should parse running GPX file (4)
|
|
111
|
-
○ skipped should parse running GPX file (5)
|
|
112
|
-
○ skipped should parse running GPX file (6)
|
|
113
|
-
Cycling
|
|
114
|
-
FIT
|
|
115
|
-
○ skipped should parse cycling FIT file (1)
|
|
116
|
-
○ skipped should parse cycling FIT file (2)
|
|
117
|
-
○ skipped should parse cycling FIT file (3)
|
|
118
|
-
○ skipped should parse cycling FIT file (4)
|
|
119
|
-
○ skipped should parse cycling FIT file (5)
|
|
120
|
-
○ skipped should parse cycling FIT file (6)
|
|
121
|
-
○ skipped should parse cycling FIT file (7)
|
|
122
|
-
○ skipped should parse cycling FIT file (8)
|
|
123
|
-
○ skipped should parse cycling FIT file (9)
|
|
124
|
-
○ skipped should parse virtual cycling FIT file (1)
|
|
125
|
-
TCX
|
|
126
|
-
○ skipped should parse cycling TCX file (1)
|
|
127
|
-
○ skipped should parse cycling TCX file (2)
|
|
128
|
-
○ skipped should parse cycling TCX file (3)
|
|
129
|
-
○ skipped should parse virtual cycling TCX file (1)
|
|
130
|
-
GPX
|
|
131
|
-
○ skipped should parse cycling GPX file (1)
|
|
132
|
-
○ skipped should parse cycling GPX file (2)
|
|
133
|
-
○ skipped should parse cycling GPX file (3)
|
|
134
|
-
○ skipped should parse cycling GPX file (4)
|
|
135
|
-
○ skipped should parse virtual cycling GPX file (1)
|
|
136
|
-
Triathlon
|
|
137
|
-
FIT
|
|
138
|
-
○ skipped should parse a .FIT Triathlon IronMan w/ 3 activities (swim + ride + run)
|
|
139
|
-
Others
|
|
140
|
-
○ skipped should reject parsing of broken fit file (empty activities)
|
|
141
|
-
○ skipped should reject parsing of broken fit file (empty sessions)
|
|
142
|
-
○ skipped should parse fit file with broken sessionObject.start_time date
|
|
143
|
-
○ skipped should handle activity with broken start lat/lng
|
|
144
|
-
○ skipped should reject parsing of a too long activity (31 days)
|
|
145
|
-
○ skipped should handle inverted elapsed and timer time
|
|
146
|
-
○ skipped should handle calculation on a ultra long activity (27 days) with acceptable human time
|
|
147
|
-
○ skipped should handle and detect an activity with broken speed data
|
|
148
|
-
|
|
149
|
-
● FIT/TCX/GPX activity parsing compliance › Swimming › FIT › should parse swimming pool FIT file (1)
|
|
150
|
-
|
|
151
|
-
Actual time of "57:53" (or 3473s) IS HIGHER THAN "44:06". Max possible value: "44:19" (or 2659.23s); Delta seconds: 13.23
|
|
152
|
-
|
|
153
|
-
159 |
|
|
154
|
-
160 | if (SpecUtils.THROW_ON_ERROR) {
|
|
155
|
-
> 161 | throw new Error(message);
|
|
156
|
-
| ^
|
|
157
|
-
162 | } else {
|
|
158
|
-
163 | console.error(message);
|
|
159
|
-
164 | }
|
|
160
|
-
|
|
161
|
-
at Function.assertNearEqualTime (src/specs/spec-utils.ts:161:15)
|
|
162
|
-
at assertNearEqualTime (src/specs/activities-parsing.integration.spec.ts:165:23)
|
|
163
|
-
|
|
164
|
-
Test Suites: 1 failed, 1 total
|
|
165
|
-
Tests: 1 failed, 56 skipped, 57 total
|
|
166
|
-
Snapshots: 0 total
|
|
167
|
-
Time: 2.952 s, estimated 3 s
|
|
168
|
-
Ran all test suites matching src/specs/activities-parsing.integration.spec.ts.
|
package/test_output_3.log
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
ts-jest[ts-jest-transformer] (WARN) Define `ts-jest` config under `globals` is deprecated. Please do
|
|
2
|
-
transform: {
|
|
3
|
-
<transform_regex>: ['ts-jest', { /* ts-jest config goes here in Jest */ }],
|
|
4
|
-
},
|
|
5
|
-
See more at https://kulshekhar.github.io/ts-jest/docs/getting-started/presets#advanced
|
|
6
|
-
console.log
|
|
7
|
-
Jest Setup: Enabled ActivityParsingOptions.generateUnitStreams.
|
|
8
|
-
|
|
9
|
-
at Object.log (jest.setup.ts:8:9)
|
|
10
|
-
|
|
11
|
-
[DEBUG-FORCE] fit-parser.js LOADING via process.stdout
|
|
12
|
-
console.error
|
|
13
|
-
[DEBUG-FORCE] fit-parser.js LOADING via console.error
|
|
14
|
-
|
|
15
|
-
111 | // eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
16
|
-
112 | // @ts-ignore
|
|
17
|
-
> 113 | import FitFileParser from 'fit-file-parser';
|
|
18
|
-
| ^
|
|
19
|
-
114 | try {
|
|
20
|
-
115 | console.log('[DEBUG-JEST-RESOLVE] fit-file-parser resolves to:', require.resolve('fit-file-parser'));
|
|
21
|
-
116 | } catch (e) {
|
|
22
|
-
|
|
23
|
-
at Object.error (node_modules/fit-file-parser/dist/cjs/fit-parser.js:6:9)
|
|
24
|
-
at Object.require (src/events/adapters/importers/fit/importer.fit.ts:113:1)
|
|
25
|
-
at Object.require (src/index.ts:4:1)
|
|
26
|
-
at Object.require (src/specs/activities-parsing.integration.spec.ts:2:1)
|
|
27
|
-
|
|
28
|
-
console.log
|
|
29
|
-
[DEBUG-JEST-RESOLVE] fit-file-parser resolves to: /Users/dimitrios/Projects/sports-lib/node_modules/fit-file-parser/dist/cjs/fit-parser.js
|
|
30
|
-
|
|
31
|
-
at Object.log (src/events/adapters/importers/fit/importer.fit.ts:115:11)
|
|
32
|
-
|
|
33
|
-
console.log
|
|
34
|
-
[DEBUG] Start parsing FIT file (1)
|
|
35
|
-
|
|
36
|
-
at Object.log (src/specs/activities-parsing.integration.spec.ts:119:17)
|
|
37
|
-
|
|
38
|
-
console.log
|
|
39
|
-
[DEBUG-FIT-PARSER] CJS helper.js LOADED - Patched Version
|
|
40
|
-
|
|
41
|
-
at log (node_modules/fit-file-parser/dist/cjs/helper.js:8:13)
|
|
42
|
-
|
|
43
|
-
console.log
|
|
44
|
-
[DEBUG-FIT-PARSER] CJS helper.js LOADED - Patched Version
|
|
45
|
-
|
|
46
|
-
at log (node_modules/fit-file-parser/dist/cjs/helper.js:8:13)
|
|
47
|
-
|
|
48
|
-
console.log
|
|
49
|
-
[DEBUG-IMPORTER] Found top-level lengths: 64
|
|
50
|
-
|
|
51
|
-
at log (src/events/adapters/importers/fit/importer.fit.ts:333:19)
|
|
52
|
-
|
|
53
|
-
console.log
|
|
54
|
-
[DEBUG] Promise resolved
|
|
55
|
-
|
|
56
|
-
at log (src/specs/activities-parsing.integration.spec.ts:126:19)
|
|
57
|
-
|
|
58
|
-
console.error
|
|
59
|
-
[DEBUG] Expectation failed Error: Actual time of "57:53" (or 3473s) IS HIGHER THAN "44:06". Max possible value: "44:19" (or 2659.23s); Delta seconds: 13.23
|
|
60
|
-
at Function.assertNearEqualTime (/Users/dimitrios/Projects/sports-lib/src/specs/spec-utils.ts:161:15)
|
|
61
|
-
at assertNearEqualTime (/Users/dimitrios/Projects/sports-lib/src/specs/activities-parsing.integration.spec.ts:165:23)
|
|
62
|
-
at processTicksAndRejections (node:internal/process/task_queues:95:5)
|
|
63
|
-
|
|
64
|
-
171 | done();
|
|
65
|
-
172 | } catch (e) {
|
|
66
|
-
> 173 | console.error('[DEBUG] Expectation failed', e);
|
|
67
|
-
| ^
|
|
68
|
-
174 | done(e);
|
|
69
|
-
175 | }
|
|
70
|
-
176 | }).catch((e) => {
|
|
71
|
-
|
|
72
|
-
at error (src/specs/activities-parsing.integration.spec.ts:173:21)
|
|
73
|
-
|
|
74
|
-
FAIL src/specs/activities-parsing.integration.spec.ts (5.449 s)
|
|
75
|
-
FIT/TCX/GPX activity parsing compliance
|
|
76
|
-
Swimming
|
|
77
|
-
FIT
|
|
78
|
-
✕ should parse swimming pool FIT file (1) (135 ms)
|
|
79
|
-
○ skipped should parse swimming pool FIT file (2)
|
|
80
|
-
○ skipped should parse swimming pool FIT file (3)
|
|
81
|
-
○ skipped should parse swimming pool FIT file (4)
|
|
82
|
-
○ skipped should parse swimming open water FIT file (1)
|
|
83
|
-
TCX
|
|
84
|
-
○ skipped should parse swimming pool TCX file (1)
|
|
85
|
-
○ skipped should parse swimming pool TCX file (2)
|
|
86
|
-
GPX
|
|
87
|
-
○ skipped should parse swimming open water GPX file (1)
|
|
88
|
-
○ skipped should parse swimming open water GPX file (2)
|
|
89
|
-
Running
|
|
90
|
-
FIT
|
|
91
|
-
○ skipped should parse running FIT file (1)
|
|
92
|
-
○ skipped should parse running FIT file (2)
|
|
93
|
-
○ skipped should parse running FIT file (Suunto export) (3)
|
|
94
|
-
○ skipped should parse running FIT file (Suunto export) (4)
|
|
95
|
-
○ skipped should parse running FIT file (Suunto export) (5)
|
|
96
|
-
○ skipped should parse running FIT file (Suunto export) (6)
|
|
97
|
-
○ skipped should parse running FIT file (Coros export) (7)
|
|
98
|
-
○ skipped should parse running FIT file (Coros export) (8)
|
|
99
|
-
○ skipped should parse running treadmill FIT file (1)
|
|
100
|
-
TCX
|
|
101
|
-
○ skipped should parse running TCX file (1)
|
|
102
|
-
○ skipped should parse running TCX file (2)
|
|
103
|
-
○ skipped should parse running TCX file (3)
|
|
104
|
-
○ skipped should parse running TCX file (4)
|
|
105
|
-
○ skipped should parse running treadmill TCX file (3)
|
|
106
|
-
GPX
|
|
107
|
-
○ skipped should parse running GPX file (1)
|
|
108
|
-
○ skipped should parse running GPX file (2)
|
|
109
|
-
○ skipped should parse running GPX file (3)
|
|
110
|
-
○ skipped should parse running GPX file (4)
|
|
111
|
-
○ skipped should parse running GPX file (5)
|
|
112
|
-
○ skipped should parse running GPX file (6)
|
|
113
|
-
Cycling
|
|
114
|
-
FIT
|
|
115
|
-
○ skipped should parse cycling FIT file (1)
|
|
116
|
-
○ skipped should parse cycling FIT file (2)
|
|
117
|
-
○ skipped should parse cycling FIT file (3)
|
|
118
|
-
○ skipped should parse cycling FIT file (4)
|
|
119
|
-
○ skipped should parse cycling FIT file (5)
|
|
120
|
-
○ skipped should parse cycling FIT file (6)
|
|
121
|
-
○ skipped should parse cycling FIT file (7)
|
|
122
|
-
○ skipped should parse cycling FIT file (8)
|
|
123
|
-
○ skipped should parse cycling FIT file (9)
|
|
124
|
-
○ skipped should parse virtual cycling FIT file (1)
|
|
125
|
-
TCX
|
|
126
|
-
○ skipped should parse cycling TCX file (1)
|
|
127
|
-
○ skipped should parse cycling TCX file (2)
|
|
128
|
-
○ skipped should parse cycling TCX file (3)
|
|
129
|
-
○ skipped should parse virtual cycling TCX file (1)
|
|
130
|
-
GPX
|
|
131
|
-
○ skipped should parse cycling GPX file (1)
|
|
132
|
-
○ skipped should parse cycling GPX file (2)
|
|
133
|
-
○ skipped should parse cycling GPX file (3)
|
|
134
|
-
○ skipped should parse cycling GPX file (4)
|
|
135
|
-
○ skipped should parse virtual cycling GPX file (1)
|
|
136
|
-
Triathlon
|
|
137
|
-
FIT
|
|
138
|
-
○ skipped should parse a .FIT Triathlon IronMan w/ 3 activities (swim + ride + run)
|
|
139
|
-
Others
|
|
140
|
-
○ skipped should reject parsing of broken fit file (empty activities)
|
|
141
|
-
○ skipped should reject parsing of broken fit file (empty sessions)
|
|
142
|
-
○ skipped should parse fit file with broken sessionObject.start_time date
|
|
143
|
-
○ skipped should handle activity with broken start lat/lng
|
|
144
|
-
○ skipped should reject parsing of a too long activity (31 days)
|
|
145
|
-
○ skipped should handle inverted elapsed and timer time
|
|
146
|
-
○ skipped should handle calculation on a ultra long activity (27 days) with acceptable human time
|
|
147
|
-
○ skipped should handle and detect an activity with broken speed data
|
|
148
|
-
|
|
149
|
-
● FIT/TCX/GPX activity parsing compliance › Swimming › FIT › should parse swimming pool FIT file (1)
|
|
150
|
-
|
|
151
|
-
Actual time of "57:53" (or 3473s) IS HIGHER THAN "44:06". Max possible value: "44:19" (or 2659.23s); Delta seconds: 13.23
|
|
152
|
-
|
|
153
|
-
159 |
|
|
154
|
-
160 | if (SpecUtils.THROW_ON_ERROR) {
|
|
155
|
-
> 161 | throw new Error(message);
|
|
156
|
-
| ^
|
|
157
|
-
162 | } else {
|
|
158
|
-
163 | console.error(message);
|
|
159
|
-
164 | }
|
|
160
|
-
|
|
161
|
-
at Function.assertNearEqualTime (src/specs/spec-utils.ts:161:15)
|
|
162
|
-
at assertNearEqualTime (src/specs/activities-parsing.integration.spec.ts:165:23)
|
|
163
|
-
|
|
164
|
-
Test Suites: 1 failed, 1 total
|
|
165
|
-
Tests: 1 failed, 56 skipped, 57 total
|
|
166
|
-
Snapshots: 0 total
|
|
167
|
-
Time: 5.616 s
|
|
168
|
-
Ran all test suites matching src/specs/activities-parsing.integration.spec.ts.
|
package/tsconfig.cjs.json
DELETED
package/tsconfig.esm.json
DELETED