Skip to content

Add unit tests & fix data import loop bug #59

Add unit tests & fix data import loop bug

Add unit tests & fix data import loop bug #59

Triggered via push February 22, 2024 10:41
Status Failure
Total duration 23s
Artifacts

run.yml

on: push
Build Docker images
0s
Build Docker images
Build & publish Docker images
0s
Build & publish Docker images
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 2 warnings
src/linky.test.ts > LinkyClient > Should fetch all historical data if first parameter is null: src/linky.test.ts#L54
AssertionError: expected [ { …(3) }, { …(3) }, { …(3) }, …(1) ] to deeply equal [ { …(3) }, { …(3) }, { …(3) }, …(1) ] - Expected + Received Array [ Object { - "start": "2023-02-28T00:00:00+01:00", + "start": "2023-02-28T00:00:00+00:00", "state": 2000, "sum": 2000, }, Object { - "start": "2023-07-28T00:00:00+02:00", + "start": "2023-07-28T00:00:00+00:00", "state": 2000, "sum": 4000, }, Object { - "start": "2023-12-31T00:00:00+01:00", + "start": "2023-12-31T00:00:00+00:00", "state": 200, "sum": 4200, }, Object { - "start": "2023-12-31T01:00:00+01:00", + "start": "2023-12-31T01:00:00+00:00", "state": 500, "sum": 4700, }, ] ❯ src/linky.test.ts:54:20
src/linky.test.ts > LinkyClient > Should fetch hourly and daily data when the last statistic is old: src/linky.test.ts#L75
AssertionError: expected [ { …(3) }, { …(3) } ] to deeply equal [ { …(3) }, { …(3) } ] - Expected + Received Array [ Object { - "start": "2023-07-28T00:00:00+02:00", + "start": "2023-07-28T00:00:00+00:00", "state": 2000, "sum": 2000, }, Object { - "start": "2023-12-25T00:00:00+01:00", + "start": "2023-12-25T00:00:00+00:00", "state": 100, "sum": 2100, }, ] ❯ src/linky.test.ts:75:20
src/linky.test.ts > LinkyClient > Should fetch only missing hourly data when the last statistic is recent: src/linky.test.ts#L93
AssertionError: expected [ { …(3) } ] to deeply equal [ { …(3) } ] - Expected + Received Array [ Object { - "start": "2023-12-25T00:00:00+01:00", + "start": "2023-12-25T00:00:00+00:00", "state": 100, "sum": 100, }, ] ❯ src/linky.test.ts:93:20
Test
Process completed with exit code 1.
Test
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Lint
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.